Aspect-oriented Programming NotesRussell Bateman |
Aspect-oriented programming (AOP) is a paradigm that enables the separation of cross-cutting concerns, such as logging, metrics and security, from the business logic of the application. This makes code both more modular and easier to maintain as well as cuts down on boilerplate.
@Transactional | This annotation results in a new aspect. |
@Aspect | Permits defining custom aspects. |
Aspect | module that collects cross-cut concerns into one place. |
Advice | the "what" of AOP; used to define what action should be performed. This is typically @Before method, @After method, @AfterReturning method, successful completion, @AfterThrowing method, exception thrown, @Around surrounding method. |
Pointcut | rule or expression defining at which point advice should be applied; @Pointcut. |
Join Point | any points at which an aspect may be applied. |