posted 20 years ago
Much as object-orientation provides support for encapsulating "commonly localizable" concerns into objects, the aspect-oriented paradigm provides a mechanism, called aspect, for modularizing crosscutting concerns. The three fundamental concepts of aspect-orientation are:
- the join point model that allows one to potentially select any execution point of a system
- the ability to add aspectual behavior at the execution points identified by using the join point model
- the support for structural amendments in order to modify the static structure of a system.
AspectJ provides all of the above points:
- the aspect construct enables one to encapsulate crosscutting concerns
- the pointcut construct allows one to select any execution point in a program
- the advice construct provides support for adding aspectual behavior at specific points in the execution flow of a system
- the introduction mechanism provides for structural amendments.
The Interceptor pattern is well-suited for identifying execution points and adding behavior at those points. However, it does not provide support for modifying the static crosscutting structure of existing software. This is what makes the main difference between the Interceptor pattern and AOP. Therefore, we can say that the Interceptor pattern provides support for certain concepts of AOP, though not all of them.
[ September 18, 2003: Message edited by: Valentin Crettaz ]