26.02.2015 Views

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

encapsulation. In short the class not only handles his work but also some other work<br />

which is not his concern.<br />

Ok now lets define crosscutting which is one of important aspect’s of AOP.<br />

Twist :- What is cross cutting in AOP ?<br />

When one or many concerns span across module its called as cross cutting.Example in<br />

our audit trail example we will probably need to audit trail for customer as well as supplier.So<br />

Audit trail can span across other objects also that is termed as cross cutting.<br />

Below are both the classes actually implemented as per class diagram 8.7. If you see the<br />

“Update” method of the customer class , its doing both of the concerns that is checking<br />

for customer code length and also maintaining the audit trail using the audit trail class.<br />

Public Class ClsCustomer<br />

Private pstrCustcode As String<br />

Private pstrCustName As String<br />

Public Property Code() As String<br />

Get<br />

Return pstrCustcode<br />

End Get<br />

Set(ByVal Value As String)<br />

pstrCustcode = Value<br />

End Set<br />

End Property<br />

Public Property CustomerName() As String<br />

Get<br />

Return pstrCustName<br />

End Get<br />

Set(ByVal Value As String)<br />

165

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!