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
Urethra

... anatomy, the urethra is a tube that connects the urinary bladder to the outside of the body. The urethra has an excretory function in both sexes, to pass urine ...

 
 
 
This page was created in 22.7 ms