Encyclopedia > Aspect-oriented programming

  Article Content

Aspect-oriented programming

In computer science, aspect-oriented programming is a programming paradigm that centers around constructs called aspects, which describe parts of an object or class from outside of the class.

Aspect-oriented programming is not limited to object-oriented programming, though. An aspect describes points (join points) in a program, where it is to be called (pointcut). Now methods or functions may be called in the aspect (called advices then), that may implement behaviour that would normally cross-cut[?] behaviour of the core concern of the application. Eg in a credit card application billing would be a core concern, and logging and persistence of participating objects would be concerns, that most likely cross-cut the whole object hierarchy. Separating these concerns from the core concerns is the main concept behind aspect-oriented progamming. It removes code not related to solving the domain problem from the business logic into its own aspect of the program. The code no more contains calls to those concerns, they are maintained and isolated in aspects, easing and isolating changes that would else spread throughout the whole application.

Actual aspect-orientation "happens" if you separate your concerns first, build independent software modules to realize them, and then combine them in a process called weaving. When weaving, you use aspects to integrate cross-cutting concerns[?] into the core concern of the application, thereby making it a whole only by this final step of weaving.

The most widely-known aspect language is AspectJ, which is based on Java, and was created at Xerox PARC.

Aspects emerged out of object-oriented programming. Aspects are closely related to programming concepts like subjects, mixins[?], and delegation.

External links



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Quadratic formula

... by it.) The symbol <math>\pm \sqrt {b^2-4ac}</math> in the formula should be understood as "either of those element(s) of the field whose squar ...

 
 
 
This page was created in 25.9 ms