Cross Cutting Concerns

February 27, 2020 | By kiranbadi1991 | Filed in: Development.

We spend quite a bit of time writing code for functionality, code for real required functionality(Core features or requirement of application), however we spend almost 2x amount of time writing code to meet the cross cutting demands of the application functionality (Think logging, security ,audit etc. ) which is not so much used directly.

Technically concern is functionality or related features which application provides to users. We use objects in Object Oriented Language and sometimes these objects can also be called as concerns.

Cross cutting concern is something which touches many parts of the application. We can have logging object, we have Audit Object which can touch almost everything the application provides to user. The logic for each of the cross cutting concern also be different.

 

Concerns

 

Generally it’s advisable to identify the cross concerns early on before we start to write the code. By recognizing the common functionality, it becomes easier to abstract those concerns. Just in case if we miss to identify these types of requirement early on, some refactoring might be required later on.

Cross cutting concerns should never be implemented as a scattered solution or as solution which mixes with core functionality. These concerns can be implemented using AOP or by using DI.

These cross cutting concerns can take 2x amount of time to design, implement and integrate with the application.


Tags:

Comments are closed here.