How to implement Design Pattern – Separation of concerns

by

What is separation of concerns in software architecture

Separation of concerns is a software architecture design pattern/principle for separating an application into distinct sections, so each section addresses a separate concern. At its essence, Separation of concerns is about order. The overall goal of separation of concerns is to establish a well-organized system where each part fulfills a meaningful and intuitive role while maximizing its ability to adapt to change.

How is separation of concerns achieved

Separation of concerns in software architecture is achieved by the establishment of boundaries. A boundary is any logical or physical constraint which delineates a given set of responsibilities. Some examples of boundaries would include the use of methods, objects, components, and services to define core behavior within an application; projects, solutions, and folder hierarchies for source organization; application layers and tiers for processing organization.

Separation of concerns - advantages

Separation of Concerns implemented in software architecture would have several advantages:

  1. Lack of duplication and singularity of purpose of the individual components render the overall system easier to maintain.
  2. The system becomes more stable as a byproduct of the increased maintainability.
  3. The strategies required to ensure that each component only concerns itself with a single set of cohesive responsibilities often result in natural extensibility points.
  4. The decoupling which results from requiring components to focus on a single purpose leads to components which are more easily reused in other systems, or different contexts within the same system.
  5. The increase in maintainability and extensibility can have a major impact on the marketability and adoption rate of the system.

There are several flavors of Separation of Concerns. Horizontal Separation, Vertical Separation, Data Separation and Aspect Separation. In this article, we will restrict ourselves to Horizontal and Aspect separation of concern.

Horizontal separation of concerns

Horizontal Separation of Concerns refers to the process of dividing an application into logical layers of functionality - UI, Business Logic and Database.

Having talked about the advantages of separation of concerns, the challenge remains in how we implement and ensure compliance. This is especially difficult for complex applications, especially applications that have been inherited and that have been under maintenance/development for several years.

A tool like CAST Imaging can help you evaluate the level of separation of concerns. By abstracting the complexity of the application and software architecture, the tool enables you to focus and strategize to achieve the desired level of separation to enhance maintainability.

CAST-Imaging-separation-of-concerns

Aspect separation of concerns

Aspect Separation of Concerns, better known as Aspect-Oriented Programming, refers to the process of segregating an application’s cross-cutting concerns from its core concerns. Cross-cutting concerns, or aspects, are concerns which are interspersed across multiple boundaries within an application.

The CAST imaging tool can help us visualize the cross-cutting concerns such as logging.

CAST-imaging-separation-of-concerns-2

In cases of development of new applications, enforcing design patterns and software architecture compliance is a challenging task. The CAST imaging tool can be run after every release to ensure compliance to the design pattern.

Click here to schedule a demo with our software architecture expert to learn more on how CAST Imaging can help you.

 

References: http://aspiringcraftsman.com/2008/01/03/art-of-separation-of-concerns/


Get the Pulse Newsletter  Sign up for the latest Software Intelligence news Subscribe Now <>
Open source is part of almost every software capability we use today. At the  very least libraries, frameworks or databases that get used in mission critical  IT systems. In some cases entire systems being build on top of open source  foundations. Since we have been benchmarking IT software for years, we thought  we would set our sights on some of the most commonly used open source software  (OSS) projects. Software Intelligence Report <> Papers
In our 29-criteria evaluation of the static application security testing (SAST)  market, we identified the 10 most significant vendors — CAST, CA Veracode,  Checkmarx, IBM, Micro Focus, Parasoft, Rogue Wave Software, SiteLock,  SonarSource, and Synopsys — and researched, analyzed, and scored them. This  report shows how each measures up and helps security professionals make the  right choice. Forrester Wave: Static Application Security Testing, Q4 2017  Analyst Paper
This study by CAST reveals potential reasons for poor software quality that  puts businesses at risk, including clashes with management and little  understanding of system architecture. What Motivates Today’s Top Performing  Developers Survey
N Natesan
N Natesan Principal Architect - SME
Proven technology architect, with 21 years of global experience in building enterprise platform, framework & application products. Expertise in digital transformation, cloud migration and microservices implementation mostly for banking and financial organizations across US & Europe.
Load more reviews
Thank you for the review! Your review must be approved first
Rating
New code

You've already submitted a review for this item

|