AOP approach addresses Crosscutting concerns. ExplainWhen classes in an OO model perform a single, specific function, they mostly share secondary requirements with other classes. Also the primary functionality of each class is very different. Even then the code needed to perform the secondary functionality is often identical.AOP approach addresses Crosscutting concerns. ExplainExamples of these “cross-cutting concerns” can be:
Security, Transactions,Logging
Security: The security implementation, specifically authorization, the use of a popular and flexible security framework can be used in enterprise applications, namely, Acegi. Acegi security simplifies implementing the authorization in applictions in a flexible manner.
Transactions: Transactions are handled in a declarative and programmatic faction. This approach is implemented in some of the frameworks for enterprise applications. Declaring an appropriate data source, transaction manager is to be configured first.The transactionality advice and the corresponding transactinality characteristics like isolation, timeout etc., is to be performed later.
Logging: Among the concerns, the Logging is the easiest concern to be implemented. To implement, a simple java class can be used. Logging includes specifying the pointcut expression and the aspect's advice type.
|