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.

√<br />

System concerns which are not related to business functionalities but software<br />

related concerns example audit trail, Error handling, Security etc.<br />

Ok let’s try to understand this principle by some actual example.<br />

Figure :- 8.7 Customer and Audit trail relationships<br />

Above is a class diagram which shows relationshipbetween two classes “ClsCustomer”<br />

and “ClsAuditTrail”. “ClsCustomer” class does inserting of new customer’s in to database<br />

and “ClsAuditTrail” does the auditing of what is changed in the customer class.<br />

Now there are two concerns in this project :-<br />

√<br />

√<br />

Customer code should not exceed greater than 10 length (Business level<br />

concern)<br />

All customer data which is updated should be audited. (System level concern)<br />

Here goes the class code. If you see the ClsCustomer implementation in the update method<br />

I have called the Audit trail implementation. If you really look from object oriented point<br />

of view we are doing something in customer class which is supposed to be not his<br />

implementation: - Audit Trail logging. Thus we have also broken down the rule of<br />

164

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

Saved successfully!

Ooh no, something went wrong!