How AOP Works to solve problems

Spring AOP allows you to keep cross-cutting concern logic separate from the mainline application logic. That means, you can implement your mainline application logic and only focus on the core problem of the application. And you can write aspects to implement your cross-cutting concerns. Spring provides many aspects out-of-the-box. After creating the aspects, you can add these aspects that is, cross-cutting behaviors to the right places into your application. Let's see the following figure that illustrates the functionality of AOP:

As you can see in the preceding figure, all aspects such as Security, Logging, and Transaction aspect are implemented separately in the application. We have added these aspects at the right places in the applications. Now our application logic is separate from the concerns. Let's see the following section defining the core AOP concepts and use AOP's terminology in your application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset