Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is Concern in AOP
What is Concern in AOP?
✍: Guest
gA concern is a particular goal, concept, or area of interesth
There are mainly two types of concern from an object perspective:-
ã Core / Main concerns which it should satisfy and is his work.
ã System concerns which are not related to business functionalities but software
related concerns example audit trail, Error handling, Security etc.
Ok let us try to understand this principle by some actual example.
Above is a class diagram which shows relationshipbetween two classes “ClsCustomer”
and “ClsAuditTrail”. “ClsCustomer” class does inserting of new customers in to database
and “ClsAuditTrail” does the auditing of what is changed in the customer class.
Now there are two concerns in this project :-
ã Customer code should not exceed than 10 lengths (Business level
concern) greater
ã All customer data which is updated should be audited. (System level concern)
Here goes the class code. If you see the ClsCustomer implementation in the update method
I have called the Audit trail implementation. If you really look from object oriented point
of view we are doing something in customer class which is supposed to be not his
implementation: - Audit Trail logging. Thus we have also broken down the rule of
encapsulation. In short the class not only handles his work but also some other work
which is not his concern.
2007-10-24, 7943👍, 0💬
Popular Posts:
What print out will the folloging code produce? main() { char *p1=“name”; char *p2; p2=(char*)malloc...
What is cross page posting? By default, button controls in ASP.NET pages post back to the same page ...
What is the difference between strings and character arrays? A major difference is: string will have...
How To Check the Oracle TNS Settings? - Oracle DBA FAQ - ODBC Drivers, DSN Configuration and ASP Con...
Can you explain different software development life cycles -part II? Water Fall Model This is the ol...