However, there are parts of a system that cannot be viewed as being the responsibility of only one class, they cross-cut the complete system and affect parts of many classes.
Object oriented programming has become mainstream over the last years, having almost completely replaced the procedural approach. One of the biggest advantages of object orientation is that a software system can be seen as being built of a collection of discrete classes. Each of these classes has a well defined task, its responsibilities are clearly defined. In an OO application, those classes collaborate to achieve the application's overall goal.
This article is divided into three parts: The first part explaines the concepts of AOP, the second introduces AspectJ(TM), an implementation of the AOP concepts in Java, and part three compares the AOP approach to metalevel programming.
>> SPECIAL OFFER
Search engine optimization
Search engine marketing services
..........................................................................
High quality search engine optimization for top search engines' rankings
Urdu Stories
Search engine optimization services
>> WHAT'S NEW?
05/20/2004
prsearch.biz/rankmass.php released.
01/15/2005
prsearch.biz/yahmass.php released.
01/15/2005
prsearch.biz/msnmass.php released.
Examples might be locking in a distributed application, exception handling, or logging method calls. Of course, the code that handles these parts can be added to each class separately, but that would violate the principle that each class has well-defined responsibilities. This is where AOP comes into play: AOP defines a new program construct, called an aspect, which is used to capture cross-cutting aspects of a software system in separate program entities. The application classes keep their well-defined resonsibilities. Additionally, each aspect captures cross-cutting behaviour.