Encyclopedia  |   World Factbook  |   World Flags  |   Reference Tables  |   List of Lists     
   Academic Disciplines  |   Historical Timeline  |   Themed Timelines  |   Biographies  |   How-Tos     
Sponsor by The Tattoo Collection
Aspect-oriented programming
Main Page | See live article | Alphabetical index

Aspect-oriented programming

In computing, aspect-oriented programming (AOP) is a programming paradigm that centers on constructs called aspectss, which treat concerns of a separate set of objects, classes, or functions. Although aspect-oriented programming is commonly associated with object-oriented programming, it is not limited as such.

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.

Aspects emerged out of object-oriented programming and are similar in function to using meta-object protocol. Aspects are closely related to programming concepts like subjects, mixins, and delegation.

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.

External links