Aspect (computer science)

From Free net encyclopedia

In computer science, an aspect is a part of a program that cross-cuts its core concerns, therefore violating its separation of concerns. For example, logging code can cross-cut many modules, yet the aspect of logging should be separate from the functional concerns of the module it cross-cuts. Isolating such aspects as logging and persistence from business logic is the aim of the aspect-oriented software development, of which aspect-oriented programming paradigm is most established area.

Aspect-orientation is not limited to programming since it is useful to identify, analyse, trace and modularise concerns (e.g., PREview) through requirements elicitation, specification and design. Aspects can be multi-dimensional by allowing both functional and non-functional behaviour to cross cut any other concerns, instead of just mapping non-functional concerns to functional requirements.

One view of aspect-oriented programming 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. This approach is known as pure aspect programming, but hybrid approaches are more commonly used, perhaps due to less of a paradigm shift between object and aspect-oriented programming is necessary. There is a similar situation with early aspect software development, with traditional methods being ehanced for aspect-orientation and new models proposed.

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.