Jump to content

Aspect (computer programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gwalla (talk | contribs) at 03:06, 29 June 2004 (Split off from aspect). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computer science, a part of a program that cross-cuts its core concerns, therefore violating its separation of concerns. In other words, it is needed to complete the program, but is not necessarily specific to the domain the program is written for. Isolating such aspects as logging and persistence from business logic is the aim of the aspect-oriented programming paradigm.

Another possible view is that every major feature of the program, core concern (business logic), or cross-cutting concern (additional features), is an aspect, and by weaving them together, you finally produce a whole out of the separate aspects.

The prism analogy describes aspects with terms from the domain of light. Like splitting light into its many aspects (different colors) with a prism, you split a problem into its separate aspects. With another prism you can put the different colors back into a white ray of light, and by the process of weaving aspects you can put your solutions for the different aspects of a problem back into a solution for the whole problem.