In any program, there are principled points (join points) where the program semantics can be identified and modified. In AOP, the programmer uses a language feature called a pointcut to specify join points, and advice (code like methodss or functionss) to specify the behavior to join at those points. Some variants of AOP also enable programmers to extend the types in the system. Together, these features enable aspects to implement behavior for concerns that crosscut the core concern of the application.
For example, in a telecommunications application, routing calls would be a core concern, but code for timing and billing those calls would crosscut the whole object hierarchy. Separating these concerns from the core concerns is the design goal for aspect-oriented progamming. It moves code not related to solving the domain problem from the business logic into a separate module. The application code no longer contains pieces of crosscutting concerns scattered across modules; instead, a crosscutting concern is maintained in an aspect; this makes it easier to maintain both the core and crosscutting concerns.
The steps to successful aspect-oriented programming are...
1. The designer defines and separates the concerns, core and crosscutting.
2. The developer writes independent modules to implement them.
3. The AOP system combines the modules (this is called weaving in AOP).
4. IDE's and debuggers display crosscutting concerns in a natural way.
The result is an easy-to-use solution woven from smaller solutions.
The most widely-known aspect-oriented language is AspectJ, which is based on Java, and was created at Xerox PARC and integrated into IBM's Eclipse Java IDE.
The term aspect-oriented programming was coined by Chris Maeda (of Xerox PARC), though the exact date when is not known. The term crosscutting was coined by Gregor Kiczales.