Components of AOP

The components of AOP are advices/interceptors, introductions, metadata, and pointcuts. Explain them

Advice: Action taken by the AOP framework at a particular joinpoint. Different types of advice include "around," "before" and "throws" advice. Many AOP frameworks model an advice as an interceptor, maintaining a chain of interceptors "around" the joinpoint.
Pointcut: A set of joinpoints specifying when an advice should fire. An AOP framework must allow developers to specify pointcuts.
Introduction: Adding methods or fields to an advised class.

The components of AOP are advices/interceptors, introductions, metadata, and pointcuts. Explain them

Advice / Interceptor: An object that intercept the invocation of a method before its execution. Interceptor embodies the behavior to add or remove or replace the functionality of infrastructure. Perfect pluggability without changes need for business logic is provided by Interceptor.

Introductions: Introductions adds states and functionality to the existisng objects.

Pointcuts: Pointcuts allows to define the loction of interceptors and introductions are to applied.

Metadata: Metadata provide information about class and runtime system hints for treating the classes. For example, AOP logging , monitoring of the code without instrumenting with the code.
AOP vs OOPs
AOP vs OOPs - AOP : Addresses cross cutting concerns, Code creation is clear, Reusability of code is at a great extent.......
Similarities between AOP and OOPs
Similarities between AOP and OOPs - Both extends and alter the behaviour of code.........
Advantages of AOP and problem solved by AOP
Advantages of AOP and problem solved by AOP - The following are the advantages of AOP: Code layering, Cross-cutting concerns, Code adjusting......
Post your comment