Aspect-Oriented Programming (AOP)

A fellow developer brought up Aspect-Oriented Programming (AOP) during lunch. AOP is a programming paradigm that increases modularity by allowing the separation of “cross-cutting concerns”. These are aspects of a program which affect (crosscut) other concerns. These concerns often cannot be cleanly decomposed from the rest of the system in both the design and implementation, and result in either scattering or tangling of the program, or both. Examples are a logging infrastructure or user-based authentication. If we want to implement these things we have to scatter around the application instructions for it (either in the beginning/end of the function/method calls).

AOP implementations have some crosscutting expressions that encapsulate each concern in one place. The critics however advocate several things against it: “AOP has an inherent ability to create unpredictable and widespread errors in a system” and “Given the power of AOP, if a programmer makes a logical mistake in expressing crosscutting, it can lead to widespread program failure.”

http://www.eclipse.org/aspectj/doc/released/progguide/index.html