Separation of Concerns

Leave a comment

Separations of Concerns (Soc) is a design principle in software development. The idea is to separate code based on the function and logic. A typical example is the separation of code that performs business logic, and the code that displays this to the user. This code should exist independently; if a developer were to write code that performed both these functions together, it would be a violation of the principle. In building an application with these separations, it makes it easier to change the user interface to something different, without having to worry about changing the business logic.

Separation of concerns has several benefits. These include:

  • Maintainability
  • Loosely coupled design

An example of SoC is the MVC (Model-View-Controller) pattern, as well as HTML and CSS.

The term is closely related to Don’t Repeat Yourself.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *

12 + 3 =