Aspects are modules implemented in an Aspect-Oriented Programming language that contain code for a cross-cutting concern, like logging or security.
Features of a program, like logging, are usually spread throughout a program. These features are not related to that program's main function and are called cross-cutting concerns. The aim of aspect-oriented software development (AOSD) (also called aspect-oriented programming or AOP) is to move cross-cutting concerns into aspects. This is called refactoring the code.
In AOSD, aspects are written separately from the main application, which can be written in any standard OOP language. An AOP compiler, like AspectJ, compiles the AOP code and object-oriented programming (OOP) code together in a process called weaving.
AOP is often used to enhance legacy applications or 3rd party libraries when the original source code is not available. It is also used to overcome the main weakness of OOP by collecting the cross-cutting concerns into aspects.
Wikis:
See also: