Member-only story
Separation of Concerns
Core Spirit
These days the term, Separation of Concerns, keeps popping up from my studies, such as Rust programming, REST tutorial, or even in my daily work. It is too frequently-mentioned in the articles so I decided to explain such an important concept in the software engineering.
In design rules, we attempt to separate a set of information into different groups, within which information associates instead of depending on those in other groups.
The term, Concerns, indicates a set of information we would like to separate in a context. In programming, we apply encapsulation to avoid private members from being revealed to clients; make use of polymorphism to refer to derived instances of the same type. The mixed use of both concepts in OOP helps us separate functionalities into modules of single responsibility. Therefore we are able to scale programs and interconnect modules based on interfaces defined rather than focus on solving dependency issues.
For example, in design pattern we advocate the rule: program to interface. This is a real application of the the concept in design work because as our program scales as requirements vary, it gets necessary to shrink code size by making modules loosely-coupled that makes a codebase maintainable, reusable and stable.