AOP is a programming paradigm that allows us to separate business logic from some technical code that crosscuts all applications. In other words, AOP allows the separation of crosscutting concerns. We will encounter crosscutting code when we input the logging code in certain methods to show technical support information. We also encounter it when we input statistic code to see how many times a method calls or who the user using the application is, or even for exception and error handling. We see this kind of code in almost all parts of an application—it is code that is repeated along the whole application. This kind of code has its own objectives and concerns, and it is a very good idea to separate it from the business code, which is related to the application use cases.
These aspects of the system (such as logging or exception...