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:
- 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.