Orthogonality

Orthogonality is a design principle that holds things which are not related conceptually should not be related in the system. The more orthogonal a design, the fewer exceptions it contains. That makes the system easier to learn, read, and write. The meaning of an orthogonal feature is independent of context, and the key parameters are symmetry and consistency.

Orthogonal components can be changed independently without affecting each other. This is a hallmark of low coupling and good separation of concerns. When a change to one module ripples through unrelated modules, that is a sign the modules are not orthogonal and the boundaries between them have been drawn in the wrong place.

Orthogonality is closely related to high cohesion. A cohesive module groups only closely related responsibilities, leaving unrelated concerns to other modules. The result is a set of modules that vary independently along a single dimension each, which is the essence of an orthogonal design.

Practiced together with decoupling and modular design, orthogonality pushes a system toward separation of concerns at every level. Each module becomes a clean axis that can be reasoned about on its own, and the overall behavior emerges from the combination of independently varying parts.