The Computing Series

Tradeoffs

AT8 — Coupling/Cohesion: Every boundary decision trades off these two properties. Grouping more functionality into fewer components raises cohesion within those components but risks making components too large and too responsible. Splitting functionality across many small components reduces responsibility per component but increases the number of boundaries, each of which is a coupling point. The right granularity depends on how independently the pieces need to change.

AT5 — Centralisation/Distribution: Shared state (common coupling) is centralised. It is easy to read and write from many places. The cost is that every reader is coupled to the state structure and to every writer. Distributing state — each component owns its own data — eliminates common coupling at the cost of coordination overhead when state must be reconciled.

Read in the book →