Aspect (computer science)
Encyclopedia
In computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, an aspect of a program is a feature linked to many other parts of the program, but which is not related to the program's primary function. An aspect crosscuts
Cross-cutting concern
In computer science, cross-cutting concerns are aspects of a program which affect other concerns.These concerns often cannot be cleanly decomposed from the rest of the system in both the design and implementation, and can result in either scattering , tangling , or both.For instance, if writing an...

 the program's core concern
Core concern
In computer science, a core concern is one of the main concerns a program is written for. The main coding of the application is to satisfy the core concerns, such as doing the tasks as visualized...

s, therefore violating its separation of concerns
Separation of concerns
In computer science, separation of concerns is the process of separating a computer program into distinct features that overlap in functionality as little as possible. A concern is any piece of interest or focus in a program. Typically, concerns are synonymous with features or behaviors...

 that tries to encapsulate unrelated functions. For example, logging code can crosscut 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
Persistence
Persistence may refer to:* Image persistence, in LCD monitors* Multidrug tolerance, a dormant, persistent state of a bacterial population* Persistence , the characteristic of data that outlives the execution of the program that created it...

 from business logic
Business logic
Business logic, or domain logic, is a non-technical term generally used to describe the functional algorithms that handle information exchange between a database and a user interface.- Scope of business logic :Business logic:...

 is the aim of aspect-oriented software development
Aspect-oriented software development
In computing, Aspect-oriented software development is an emerging software development technology that seeks new modularizations of software systems in order to isolate secondary or supporting functions from the main program's business logic...

 (AOSD), of which the aspect-oriented programming
Aspect-oriented programming
In computing, aspect-oriented programming is a programming paradigm which aims to increase modularity by allowing the separation of cross-cutting concerns...

 (AOP) paradigm
Programming paradigm
A programming paradigm is a fundamental style of computer programming. Paradigms differ in the concepts and abstractions used to represent the elements of a program and the steps that compose a computation A programming paradigm is a fundamental style of computer programming. (Compare with a...

 is the most widely employed.

Aspect-orientation is not limited to programming since it is useful to identify, analyse, trace and modularise concerns (e.g., PREview
PREview
PREview is a requirements method which focuses on the early stage of Requirements Engineering: discovering and documenting requirements. PREview uses a Viewpoint-Oriented Approach to enable the conversion of top-level goals into requirements and constraints...

) through requirements elicitation, specification and design. Aspects can be multi-dimensional by allowing both functional and non-functional behaviour to crosscut any other concerns, instead of just mapping non-functional concerns to functional requirements.

One view of aspect-oriented software development is that every major feature of the program, core concern (business logic), or cross-cutting concern (additional features), is an aspect, and by weaving
Aspect weaver
An aspect weaver is a metaprogramming utility for aspect-oriented languages designed to take instructions specified by aspects and generate the final implementation code. The weaver integrates aspects into the locations specified by the software as a pre-compilation step...

them together (a process also called composition), one finally produces a whole out of the separate aspects. This approach is known as pure aspect programming, but hybrid approaches are more commonly used, perhaps since there is less of a paradigm shift between object- and aspect-oriented programming. There is a similar situation with early aspect software development (e.g., requirements), with traditional methods being enhanced for aspect-orientation and new models proposed. Non-functional concerns (e.g., security) can crosscut functional concerns (e.g., door must be present). It is possible for functional concerns to crosscut non-functional or functional concerns (e.g., need for more features harms mobility). A uniform approach to representation and composition, similar to the pure approach in AOP, is termed multidimensional representation.

The prism analogy describes aspects with terms from the domain of light. Like splitting light into its many aspects (different colours) with a prism, one splits a problem into its separate aspects. With another prism you can put the different colours back into a white ray of light, and by the process of weaving aspects one can put the solutions for the different aspects of a problem back into a solution for the whole problem.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK