Difference between revisions of "Spring AOP"
(Created page with "One of the key components of Spring Framework is '''the Aspect oriented programming (AOP)''' framework. '''Aspect-Oriented Programming entails breaking down program logic into...") |
|||
Line 1: | Line 1: | ||
− | One of the key components of Spring Framework is '''the Aspect oriented programming (AOP)''' framework. '''Aspect-Oriented Programming entails breaking down program logic into distinct parts called so-called concerns. 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 like logging, auditing, declarative transactions, security, caching, etc. | + | One of the key components of Spring Framework is '''the Aspect oriented programming (AOP)''' framework. '''Aspect-Oriented Programming entails breaking down program logic into distinct parts called so-called concerns. 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 like '''logging''', '''auditing''', '''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. Dependency Injection helps you decouple your application objects from each other and AOP helps you decouple cross-cutting concerns from the objects that they affect. AOP is like triggers in programming languages such as Perl, .NET, Java, and others. | The key unit of modularity in OOP is the class, whereas in AOP the unit of modularity is the aspect. Dependency Injection helps you decouple your application objects from each other and AOP helps you decouple cross-cutting concerns from the objects that they affect. AOP is like triggers in programming languages such as Perl, .NET, Java, and others. | ||
'''Spring AOP module provides interceptors to intercept an application'''. For example, '''when a method is executed, you can add extra functionality before or after the method execution'''. | '''Spring AOP module provides interceptors to intercept an application'''. For example, '''when a method is executed, you can add extra functionality before or after the method execution'''. |
Revision as of 14:42, 28 June 2018
One of the key components of Spring Framework is the Aspect oriented programming (AOP) framework. Aspect-Oriented Programming entails breaking down program logic into distinct parts called so-called concerns. 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 like logging, auditing, 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. Dependency Injection helps you decouple your application objects from each other and AOP helps you decouple cross-cutting concerns from the objects that they affect. AOP is like triggers in programming languages such as Perl, .NET, Java, and others.
Spring AOP module provides interceptors to intercept an application. For example, when a method is executed, you can add extra functionality before or after the method execution.