Cross-cutting concern

Revision as of 05:49, 21 May 2024 by imported>LucasBrown (Adding local short description: "Concept in aspect-oriented software development", overriding Wikidata description "concept in aspect-oriented software development")
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description In aspect-oriented software development, cross-cutting concerns are aspects of a program that affect several modules, without the possibility of being encapsulated in any of them. 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 (code duplication), tangling (significant dependencies between systems), or both.

For instance, if writing an application for handling medical records, the indexing of such records is a core concern, while logging a history of changes to the record database or user database, or an authentication system, would be cross-cutting concerns since they interact with more parts of the program.

BackgroundEdit

Cross-cutting concerns are parts of a program that rely on or must affect many other parts of the system. They form the basis for the development of aspects.<ref name="Patent 4">Template:Harvnb</ref> Such cross-cutting concerns do not fit cleanly into object-oriented programming or procedural programming.<ref name="Seminal 1">Template:Harvnb</ref>

Cross-cutting concerns can be directly responsible for tangling, or system inter-dependencies, within a program. Because procedural and functional language constructs consist entirely of procedure calling, there is no semantic through which two goals (the capability to be implemented and the related cross-cutting concern) can be addressed simultaneously.<ref name="Seminal 6">Template:Harvnb</ref> As a result, the code addressing the cross-cutting concern must be scattered, or duplicated, across the various related locations, resulting in a loss of modularity.<ref name="Seminal 1" />

Aspect-oriented programming aims to encapsulate cross-cutting concerns into aspects to retain modularity. This allows for the clean isolation and reuse of code addressing the cross-cutting concern.<ref name="Seminal 2">Template:Harvnb</ref> By basing designs on cross-cutting concerns, software engineering benefits can include modularity and simplified maintenance.<ref name="Li 1">Template:Harvnb</ref>

ExamplesEdit

Examples of concerns that tend to be cross-cutting include:

See alsoEdit

ReferencesEdit

Template:Reflist

BibliographyEdit

Template:Sfn whitelist

Further readingEdit

  • Laddad, R. (2003): AspectJ in Action, Practical Aspect-Oriented Programming, Manning Publications Co.

External linksEdit

Template:Aosd