Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Cross-cutting concern
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Concept in aspect-oriented software development}} In [[aspect-oriented software development]], '''cross-cutting concerns''' are [[Aspect (computer programming)|aspects]] of a [[computer program|program]] that affect several [[Modular programming|modules]], without the possibility of being [[Encapsulation (computer programming)|encapsulated]] in any of them. These [[Concern (computer science)|concerns]] often cannot be cleanly [[Modularity (programming)|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 software|application]] for handling [[Electronic health record|medical records]], the indexing of such records is a [[core concern]], while [[Data logging|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. ==Background== 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 [[aspect (computer science)|aspects]].<ref name="Patent 4">{{harvnb|Kiczales et al.|2002|p=4}}</ref> Such cross-cutting concerns do not fit cleanly into [[object-oriented programming]] or [[procedural programming]].<ref name="Seminal 1">{{harvnb|Kiczales|Lamping|Mendhekar|Maeda|1997|p=1}}</ref> Cross-cutting concerns can be directly responsible for ''tangling'', or system inter-dependencies, within a [[computer program|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">{{harvnb|Kiczales|Lamping|Mendhekar|Maeda|1997|p=6}}</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 (programming)|modularity]].<ref name="Seminal 1" /> [[Aspect-oriented programming]] aims to [[encapsulation (computer science)|encapsulate]] cross-cutting concerns into [[aspect (computer science)|aspects]] to retain modularity. This allows for the clean isolation and reuse of code addressing the cross-cutting concern.<ref name="Seminal 2">{{harvnb|Kiczales|Lamping|Mendhekar|Maeda|1997|p=2}}</ref> By basing designs on cross-cutting concerns, [[software engineering]] benefits can include modularity and simplified maintenance.<ref name="Li 1">{{harvnb|Li|Krishnamurthi|Fisler|2002|p=1}}</ref> ==Examples== Examples of concerns that tend to be cross-cutting include: * [[Business rule]]s * [[Cache (computing)|Caching]] * [[Code mobility]] * [[Data validation]] * Domain-specific [[Optimization (computer science)|optimizations]] * [[Environment variables]] and other global configuration settings * [[Error detection and correction]] * [[Internationalization and localization]] which includes [[Language localisation]] * [[Information security]] * [[Log file|Logging]] * [[Memory management]] * [[Observer pattern|Monitoring]] * [[Persistence (computer science)|Persistence]] * [[Feature interaction problem|Product features]] * [[Real-time computing|Real-time constraints]] * [[Synchronization (computer science)|Synchronization]] * [[Transaction processing]] * [[Context-sensitive help]] * [[Privacy]] * [[Computer security]] ==See also== * [[Separation of concerns]] * [[Aspect-oriented programming]] * [[Code refactoring]] (restructuring software) * [[Database normalization]] (minimize needlessly replicated data) * [[Multiple inheritance]] * [[Microservices]] * [[Orthogonalization]] (mathematical normalization) ==References== {{reflist}} ==Bibliography== {{sfn whitelist|CITEREFKiczales_et_al.2002}} *{{cite journal|last1=Kiczales|first1=Gregor|last2=Lamping|first2=John|last3=Mendhekar|first3=Anurag|last4=Maeda|first4=John|last5=Lopes|first5=Cristina|last6=Longtier|first6=Jean-Marc|last7=Irwin|year=1997|title=Aspect-Oriented Programming|journal=Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP 1997)|pages=220–242}} *{{US patent reference|number=6467086|y=2002|m=10|d=15| inventor = Kiczales et al.|title = [[Aspect-oriented programming]]|ref={{sfnref|Kiczales et al.|2002}}}} *{{cite journal|title=Verifying Cross-Cutting Features as Open Systems|last1=Li|first1=Harry|first2=Shriram|last2=Krishnamurthi|first3=Kathi|last3=Fisler|journal=ACM SIGSOFT Software Engineering Notes|volume=27|issue=6|year=2002|pages=89–98|doi=10.1145/605466.605481|citeseerx=10.1.1.8.9445|s2cid=52835673}} *{{cite journal|last1=Parnas|first1=David L.|date=December 1972|title=On the Criteria To Be Used in Decomposing Systems into Modules|journal=[[Communications of the ACM]]|volume=15|issue=12|pages=1053–1058|citeseerx = 10.1.1.90.8963|doi=10.1145/361598.361623 |s2cid=53856438}} *{{cite book|last1=Tarr|first1=Peri|last2=Ossher|first2=Harold|last3=Harrison|first3=William|first4=Stanley M. Jr.|last4=Sutton|chapter=N degrees of separation: Multi-dimensional separation of concerns |year=1999|title=Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002)|location=Los Angeles, California, USA|publisher=[[IEEE Computer Society Press]]|pages=107–119|doi=10.1109/ICSE.1999.841000|citeseerx = 10.1.1.89.1641 |isbn=978-1-58113-074-4}} ==Further reading== *Laddad, R. (2003): AspectJ in Action, Practical Aspect-Oriented Programming, Manning Publications Co. ==External links== *[https://web.archive.org/web/20150919015041/http://www.aosd.net/wiki/index.php?title=Glossary AOSD.net's] glossary of [[aspect-oriented programming|aspect oriented]] terms (via [https://web.archive.org/web/20150919015041/http://www.aosd.net/wiki/index.php?title=Glossary Internet Archive Wayback Machine]; AOSD.net has become [http://modularity.info/ Modularity]). *[[AspectJ]] [http://eclipse.org/aspectj/], an Aspect-Oriented extension to the [[Java (programming language)|Java programming language]] *Bergmans, L., M. Aksit (2001): Composing Multiple Concerns Using Composition Filters, https://web.archive.org/web/20170909131212/http://trese.cs.utwente.nl/ (24 July 2004) *Berg, K. van den, Conejero, J. and Chitchyan, R. (2005). AOSD Ontology 1.0 ‐ Public Ontology of Aspect‐Orientation. AOSD Europe Network of Excellence, http://eprints.eemcs.utwente.nl/10220/01/BergConChi2005.pdf *Here is an example of handling a cross-cutting concern: https://web.archive.org/web/20161220151503/https://www.captechconsulting.com/blogs/a-persistence-pattern-using-threadlocal-and-ejb-interceptors {{aosd}} [[Category:Aspect-oriented software development]] [[Category:Aspect-oriented programming]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Aosd
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Harvnb
(
edit
)
Template:Reflist
(
edit
)
Template:Sfn whitelist
(
edit
)
Template:Short description
(
edit
)
Template:US patent reference
(
edit
)