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.
Search Encyclopedia
|
Featured Article
|