Aspect-oriented programming: Difference between revisions

Content deleted Content added
top: redirect
No edit summary
Line 5:
In [[computing]], '''aspect-oriented programming''' ('''AOP''') is a [[programming paradigm]] that aims to increase [[Modularity (programming)|modularity]] by allowing the [[separation of concerns|separation of]] [[cross-cutting concern]]s. It does so by adding additional behavior to existing code (an [[Advice (programming)|advice]]) ''without'' modifying the code itself, instead separately specifying which code is modified via a "[[pointcut]]" specification, such as "log all function calls when the function's name begins with 'set{{'"}}. This allows behaviors that are not central to the [[business logic]] (such as logging) to be added to a program without cluttering the code core to the functionality.
 
AOP includes programming methods and tools that support the modularization of concerns at the level of the source code, while "'''aspect-oriented software development"''' refers to a whole engineering discipline.
 
Aspect-oriented programming entails breaking down program logic into distinct parts (so-called ''concerns'', cohesive areas of functionality). Nearly all programming paradigms support some level of grouping and [[encapsulation (computer science)|encapsulation]] of concerns into separate, independent entities by providing abstractions (e.g., functions, procedures, modules, classes, methods) that can be used for implementing, abstracting and composing these concerns. Some concerns "cut across" multiple abstractions in a program, and defy these forms of implementation. These concerns are called ''cross-cutting concerns'' or horizontal concerns.