Aspect-Oriented Programming (AOP)

Categories: Spring

Aspect-Oriented Programming (AOP)

 

One of the key components of Spring is the Aspect-Oriented Programming (AOP) framework. The functions that span multiple points of an application are called cross-cutting concerns and these cross-cutting concerns are conceptually separate from the application's business logic. There are various common good examples of aspects including logging, declarative transactions, security, caching, etc.

The key unit of modularity in OOP is the class, whereas in AOP the unit of modularity is the aspect. DI helps you decouple your application objects from each other, while AOP helps you decouple cross-cutting concerns from the objects that they affect. 

The AOP module of Spring Framework provides an aspect-oriented programming implementation allowing you to define method-interceptors and pointcuts to cleanly decouple code that implements functionality that should be separated. 

Spring could potentially be a one-stop shop for all your enterprise applications. However, Spring is modular, allowing you to pick and choose which modules are applicable to you, without having to bring in the rest. The following section provides details about all the modules available in Spring Framework.

 

Core Container

The Core Container consists of the Core, Beans, Context, and Expression Language modules the details of which are as follows:

  • The Core module provides the fundamental parts of the framework, including the IoC and Dependency Injection features.
  • The Bean module provides BeanFactory, which is a sophisticated implementation of the factory pattern.
  • The Context module builds on the solid base provided by the Core and Beans modules and it is a medium to access any objects defined and configured. The ApplicationContext interface is the focal point of the Context module.
  • The SpEL module provides a powerful expression language for querying and manipulating an object graph at runtime.

Top Blogs
Spring vs Laravel : A detail Comparison between Laravel vs Spring Framework Published at:- Benefits of Using the Spring Framework Published at:- Aspect-Oriented Programming (AOP) Published at:- Data Access, Integration, and Miscellaneous in Spring framework Published at:- Spring – Environment Setup Published at:- Unleashing the Power of Microservices with Spring Boot Applications Published at:-
R4R.co.in Team
The content on R4R is created by expert teams.