Cross Cutting

Cross Cutting

:"For other uses, see Cross cut."

Cross cutting

Even though most classes in an object-oriented programming model will perform a single, specific function, they often share common, secondary requirements with other classes. These secondary requirements are said to cross-cut into the primary requirements.

For example, a typical application comprises cross cutting concerns like logging within the data access layer and also in the user interface layer whenever a thread enters or exits a method. Even though the primary functionality of each class is very different, the code needed to perform the secondary functionality, in this case, logging, is often identical.

Example code

public class SomeBusinessClass extends OtherBusinessClass { // Core data members // Other data members: Log stream, data-consistency flag // Override methods in the base class public void performSomeOperation(SomeOperationInformation info) { // Ensure authentication // Ensure info satisfies contracts // Lock the object to ensure data-consistency in case other // threads access it // Ensure the cache is up to date // Log the start of operation // = Perform the core operation =

// // // // = End performing the core operation =

// Log the completion of operation // Unlock the object } // More operations similar to above public void save(PersitanceStorage ps) { } public void load(PersitanceStorage ps) { } }

In the code above, we must consider at least three issues:
# Other data members do not belong to this class's core concern.
# Implementation of performSomeOperation() seems to do more than perform the core operation; it seems to handle the peripheral data logging, authentication, multithread safety, contract validation, and cache management concerns. In addition, many of these peripheral concerns would likewise apply to other classes.
# It is not clear if save() and load() performing persistence management should form the core part of the class.

See also

*Aspect
*AspectJ
*Aspect-oriented programming
*Pointcut

External links

* [http://eclipse.org/aspectj AspectJ Home Page]
* [http://eclipse.org/ajdt AJDT Home Page]
* [http://aosd.net AspectOriented Software Development HomePage]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Cross-cutting — This article is about a filming technique. For other terms, see Cross cut (disambiguation). Cross cutting is an editing technique most often used in films to establish action occurring at the same time in two different locations. In a cross cut,… …   Wikipedia

  • cross-cutting — /ˈkrɒs kʌtɪŋ/ (say kros kuting) adjective related; connected: cross cutting issues. Also, (especially in predicative use), cross cutting /krɒs ˈkʌtɪŋ/ (say kros kuting) …  

  • Cross-cutting — Eine Parallelmontage (engl. cross cutting) ist eine Technik der Filmmontage, bei der die aufeinanderfolgenden Einstellungen zwischen zwei oder mehr Handlungssträngen hin und her springen. Die Parallelmontage wurde bereits in frühen Filmen, wie… …   Deutsch Wikipedia

  • Cross-cutting relationships — Cross cutting relations can be used to determine the relative ages of rock strata and other geological structures. Explanations: A folded rock strata cut by a thrust fault; B large intrusion (cutting through A); C erosional angular unconformity… …   Wikipedia

  • Cross-cutting cleavage — is a political term that refers to factors in society which cause division (such as race, political, religious divisions etc) in such a way that no group created by one cleavage is wholly contained within a group created by another hence cross… …   Wikipedia

  • Cross-Cutting Concern — (CCC) ist ein Begriff der Informatik, der im Kontext des Teile und Herrsche Prinzips so genannte querschnittliche Belange einer Software bezeichnet, die deshalb nicht einfach modularisiert werden können, weil herkömmliche Modularisierungsansätze… …   Deutsch Wikipedia

  • Cross-cutting concern — In computer science, cross cutting concerns are aspects of a program which affect other concerns. These concerns often cannot be cleanly decomposed from the rest of the system in both the design and implementation, and can result in either… …   Wikipedia

  • Cross-Cutting Programs Committee — The Cross Cutting Programs Committee of the Economic, Social and Cultural Council for the African Union deals with issues not explicitly dealt with by other committees. They are: HIV/AIDS. International cooperation. Coordination with institutions …   Wikipedia

  • cross-cutting —   the editing technique of alternating, interweaving, or interspersing one narrative action (scene, sequence, or event) with another usually in different locations or places, thus combining the two; this editing method suggests parallel action… …   Glossary of cinematic terms

  • Cross-cutting — Поперечная разрезка (картона, ленты) …   Краткий толковый словарь по полиграфии

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”