skip to content

Architectural Principles

The same design instincts applied at system scale: where boundaries go, which way dependencies point, how to layer, and what belongs in one component. These are the principles you cite when justifying a module structure to a room of architects.

part ofSoftware design & architectureoverview, primer and where to startread it →
on this pageshow

questions

page 2 of 2

When does horizontal technical layering (presentation/domain/infrastructure) become a liability, and what structural alternatives — such as vertical feature slices or modular decomposition — would you choose instead?

level: principalimportance: should knowfreq 38%

basics

~20 s

Layering groups code by technical role, so one feature is spread across many folders and most changes touch every layer. When features change independently and teams own features, grouping by feature (vertical slices or modules) — with layering applied inside each slice — usually beats a single global layer stack.

open as a page

How do you decide when NOT to separate two concerns? Give the costs of a boundary and the signals that a split is wrong.

level: principalimportance: should knowfreq 29%

basics

~20 s

Every boundary costs something: extra interfaces, mapping code, and — if it's a process boundary — network calls and lost transactions. Don't split when two things always change together, must stay consistent in one transaction, or when you don't yet understand the domain.

open as a page

Dependency inversion has real costs. As the architect of a large system, how do you decide which dependencies to invert, and how do you keep the chosen dependency direction from eroding over time?

level: principalimportance: nice to knowfreq 26%

basics

~20 s

Invert only where volatility crosses an important boundary — vendors, I/O, the clock, anything you might replace. Skip it for stable, single-implementation code. Then make direction machine-enforced: separate build artifacts and architecture tests in CI, not code-review discipline.

open as a page

Meilir Page-Jones proposed "connascence" as a finer-grained replacement for the coupling/cohesion vocabulary. What is it, what are its three measures, and how does it guide refactoring decisions across a module boundary?

level: principalimportance: nice to knowfreq 16%

basics

~20 s

Connascence means two pieces of code are "born together": if one changes, the other must change to stay correct. It names the kind of agreement (name, type, position, meaning, algorithm, timing, order, identity) and rates it by strength, degree, and locality — giving concrete refactoring targets instead of a vague "too coupled".

open as a page

showing 31–34 of 34