HOME

TheInfoList




An aspect of a program is a
feature Feature may refer to: Computing * Feature (CAD), could be a hole, pocket, or notch * Feature (computer vision), could be an edge, corner or blob * Feature (software design) is an intentional distinguishing characteristic of a software item ...
linked to many other parts of the program, but which is not related to the program's primary function. An aspect crosscuts the program's
core concern Core or cores may refer to: Science and technology * Core (anatomy), everything except the appendages * Core (manufacturing), used in casting and molding * Core (optical fiber), the signal-carrying portion of an optical fiber * Core, the central p ...
s, therefore violating its
separation of concerns In computer science Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application. Computer science is the study of compu ...
that tries to encapsulate unrelated functions. For example,
logging Logging is the process of cutting, processing, and moving trees to a location for transport. It may include skidder, skidding, on-site processing, and loading of trees or trunk (botany), logs onto logging truck, trucks or flatcar#Skeleton car, s ...
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 may refer to: Math and computers * Image persistence, in LCD monitors * Persistence (computer science), the characteristic of data that outlives the execution of the program that created it * Persistence of a number, a mathematical qu ...
from
business logic In computer software Software is a collection of instructions Instruction or instructions may refer to: Computing * Instruction, one operation of a processor within a computer architecture instruction set * Computer program, a collection of in ...
is the aim of aspect-oriented software development (AOSD), of which the
aspect-oriented programming In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes and development of both computer hardware , hardware and sof ...
(AOP)
paradigm In science Science () is a systematic enterprise that Scientific method, builds and organizes knowledge in the form of Testability, testable explanations and predictions about the universe."... modern science is a discovery as well as ...
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 may refer to: Theatre, film, television * Preview (subscription service), an early subscription television service in the United States * Preview (theatre), a public performance of a theatrical show before the official opening * Preview sc ...
) 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 Weaving is a method of textile A textile is a flexible material made by creating an interlocking bundle of yarn Yarn is a long continuous length of interlocked fibres, suitable for use in the production of textiles, sewing, crocheti ...
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.


See also

*
AspectJ AspectJ is an aspect-oriented programming (AOP) extension created at PARC (company), PARC for the Java (programming language), Java programming language. It is available in Eclipse Foundation open-source projects, both stand-alone and integrated i ...


References

{{aosd Aspect-oriented software development Aspect-oriented programming