liveBook · Manning

SOLID principles

As explained in Build High Value Software Systems

A set of five software design principles intended to make code easier to change.

SOLID describes five structural properties intended to make code easier to change. In legacy work, use the principles to guide structural changes where they reduce friction on paths the team actually changes. section 7.3.2

Judge a proposed design change by its effect on real work:

  • Consider splitting a class when frequent changes and developer collisions make the file a coordination bottleneck. section 7.3.2
  • Avoid adding files and indirection when a class changes rarely and the split would not reduce meaningful friction. section 7.3.2
  • Use extension rather than modification when preserving production-tested logic is valuable; avoid awkward extension points where code needs changing anyway. section 7.3.2
Table 7.3 SOLID from a waste point of view
Principle
What it says?
Waste it reduces in legacy code
When it costs more than it saves
Single Responsibility (SRP)
Each class has one reason to change
Coordination waste. Changes stay isolated. Developers stop colliding in the same file. Reviews stay fast; blast radius stays contained.
Applied to a file touched twice a year, SRP creates inventory, more files, more indirection, more surface area—without reducing any real friction.
Open/Closed
Extend through new code, not modification
Rework and defect risk. Battle-tested logic stays untouched. Code that survived five years of production carries embedded knowledge, edge cases handled, and race conditions avoided. Extending preserves what production has already validated.
Applied where the existing code needs to change anyway, Open/Closed forces awkward extension points that add indirection without protecting anything.
Liskov Substitution
Subtypes must behave like the types they replace
Rework waste. When interfaces lie about behavior, developers build on false assumptions. Every false assumption discovered late costs investigation, a bug fix, a re-review, and a redeployment.
Rarely costs more than it saves, but enforcing it on types nobody substitutes is effort spent on a constraint that never fires.
Interface Segregation
Clients should not depend on interfaces they do not use
Waiting waste. Large interfaces create coupling that makes changes ripple further than necessary. A module depending on twenty methods cannot ship independently, even if it uses two.
Splitting a stable interface nobody complains about creates more files and more contracts to maintain for no measurable flow gain.
Dependency Inversion
Depend on abstractions, not concrete implementations
Waiting waste and slow feedback. Business logic tested without infrastructure runs in milliseconds. Teams develop in parallel without shared environments.
Applied to a module with no tests and no plan for tests, the abstraction sits unused, an inventory with zero return.

Compare how selected SOLID principles reduce legacy-code waste and when their added structure may cost more than it saves. section 7.3.2

How Build High Value Software Systems covers it

How deep it goes
Relates five structural properties to waste and change frequency, with SRP and Open/Closed examples rather than details of all five.
Examples
Uses a frequently changing, collision-prone file to illustrate SRP and production-tested logic to illustrate Open/Closed.
What you can do after
Evaluate whether a structural change reduces friction on a high-churn path enough to justify added files and indirection.
How it connects
Connects SOLID to seams, design patterns, legacy-code testing, and change frequency.

Also explained in

Compare how 5 books explain SOLID principles →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build High Value Software Systems. The section links point to the parts of the book it draws on.