The Twin Pillars: Separation Of Concerns and Clarity Of Coupling
The central skill of software engineering is to analyse the problem to figure out what the different aspects are, and how those aspects relate to each other.
More precisely, an 'aspect' of a programming problem is an area of concern, or responsibility that can be abstracted from from it.
The first pillar of software engineering is to separate the concerns into separate software modules (generally, functions or objects).
The second pillar of software engineering is to decide how the separate concerns will be connected.
The separated concerns and the coupling between them are two sides of the same coin. They define the totality of your software architecture. Deciding on what the concerns are and how they connect is what software architecture is.
Platinum Rule Of Thumb
Break computer code into separate modules such that:
- Each module deals with a single concern or responsibility.
- The coupling between the modules is minimised.
To add more nuance: The coupling between modules should be made as clear and obvious as possible. This is often achieved by minimising the amount of coupling.
🙠