Aspect-oriented programming

related topics
{math, number, function}
{system, computer, user}
{theory, work, human}
{law, state, case}
{@card@, make, design}
{company, market, business}
{game, team, player}
{group, member, jewish}
{water, park, boat}

In computing, aspect-oriented programming (AOP) is a programming paradigm which isolates secondary or supporting functions from the main program's business logic. It aims to increase modularity by allowing the separation of cross-cutting concerns, forming a basis for aspect-oriented software development.

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.

Contents

Overview

Aspect-oriented programming entails breaking down program logic into distinct parts (so-called concerns, cohesive areas of functionality). All programming paradigms support some level of grouping and encapsulation of concerns into separate, independent entities by providing abstractions (e.g. procedures, modules, classes, methods) that can be used for implementing, abstracting and composing these concerns. But some concerns defy these forms of implementation and are called crosscutting concerns because they "cut across" multiple abstractions in a program.

Logging exemplifies a crosscutting concern because a logging strategy necessarily affects every logged part of the system. Logging thereby crosscuts all logged classes and methods.

All AOP implementations have some crosscutting expressions that encapsulate each concern in one place. The difference between implementations lies in the power, safety, and usability of the constructs provided. For example, interceptors that specify the methods to intercept express a limited form of crosscutting, without much support for type-safety or debugging. AspectJ has a number of such expressions and encapsulates them in a special class, an aspect. For example, an aspect can alter the behavior of the base code (the non-aspect part of a program) by applying advice (additional behavior) at various join points (points in a program) specified in a quantification or query called a pointcut (that detects whether a given join point matches). An aspect can also make binary-compatible structural changes to other classes, like adding members or parents.

Full article ▸

related documents
Advanced Encryption Standard
SHA hash functions
Preprocessor
Arithmetic coding
Object-oriented programming
Cyclic redundancy check
Abstraction (computer science)
MATLAB
White noise
Uniform Resource Identifier
Type theory
Hexadecimal
PL/SQL
Database normalization
Probability density function
Goldbach's conjecture
Homology (mathematics)
Breadth-first search
Chaitin's constant
Linear independence
Factorization
Fuzzy logic
Pushdown automaton
Glossary of topology
Euclidean algorithm
Heine–Borel theorem
Axiom schema of replacement
Presentation of a group
Natural number
Euclidean space