Separation of concerns, cohesiveness, and coupling
A system is composed of many components and the interconnections among them. The ability to group and separate elements in the system has become a crucial factor in ensuring it is maintainable, reusable, and extendable. We are going to cover three fundamental concepts that will help us group and separate elements appropriately, namely separation of concerns, cohesiveness, and coupling.
Separation of concerns
Separation of concerns is a fundamental principle that we should apply in every corner of the system. It is a principle that advocates segregating the system into independent components and having each component address a specific concern. Separation of concerns aims at creating a system that is easier to maintain, reason, and update, and which can adapt to changes in requirements over time.
Let us take the following scenario as an example: the submission of a draft service exchange contract from a household’s browser...