Aspects Oriented Programming(AOP) with Spring:-
Aspect-Oriented Programming (AOP) complements Object-Oriented Programming (OOP) by providing another way of thinking about program structure. The key unit of modularity in OOP is the class, whereas in AOP the unit of modularity is the aspect. Aspects enable the modularization of concerns such as transaction management that cut across multiple types and objects.
Aspect-oriented programming breaking down program logic into distinct parts (so-called concerns, cohesive areas of functionality). All programming paradigms support some level of grouping and encapsulation of concerns into separate, independent entities by providing abstractions (e.g., procedures, modules, classes, methods) that can be used for implementing, abstracting, and composing these concerns.
A cross-cutting concern is a concern that can affect the whole application and should be centralized in one location in code as possible, such as transaction management, authentication, logging, security etc.
AOP is used in the Spring Framework to as:
1 Provide declarative enterprise services, especially as a replacement for EJB declarative services. The most important such service is declarative transaction management.
2 Allow users to implement custom aspects, complementing their use of OOP with AOP.