What is Aspect-Oriented Programming (AOP)?
Aspect-Oriented Programming (AOP), also named Aspect-Oriented Software Development (AOSD), is an approach to software development that goes further in the direction of separation of concerns. Separation of concerns is one of the most important rules in software development. It states that the same concern should be solved in a single unit of code. This is also called modularization. In procedural programming, the unit of code is the procedure (or function, or method). In object-oriented programming, the unit of code is the class. Some concerns cannot be implemented successfully using a pure procedural or object-oriented programming. An example is code security. If you want to secure objects and methods, you have to modify the code of each method. That’s why security is said a crosscutting concern, because it crosscuts the unit of modularization of the programming paradigm, in this case the class. An aspect is a concern that cross-cuts many classes and/or methods. So AOP is a technique