SOLID Principles

Recognising object-oriented code that will be hard to change, and restructuring it with the five SOLID principles.

  • 7 topics
  • 58 cards
  • 34 questions
  • Beginner to Advanced
Share
  • Design rot and the SOLID principles: why working object-oriented code becomes hard to change, and the five principles that answer it.

    Beginner to Intermediate9 cards · 7 qnot started

  • The single responsibility principle in SOLID: give each class one reason to change, by splitting it along the people who ask for changes.

    Beginner to Intermediate8 cards · 4 qnot started

  • The open/closed principle in SOLID: add new behaviour as new code, without editing classes that already work.

    Beginner to Intermediate8 cards · 4 qnot started

  • The Liskov substitution principle in SOLID: a subclass must work anywhere its parent does, keeping every promise the parent makes.

    Beginner to Intermediate9 cards · 5 qnot started

  • The interface segregation principle in SOLID: give each client a small interface holding only the methods it calls.

    Beginner to Intermediate8 cards · 4 qnot started

  • The dependency inversion principle in SOLID: make business rules depend on abstractions they own, so databases and services can be swapped and faked in tests.

    Beginner to Intermediate9 cards · 5 qnot started

  • Applying the SOLID principles together: diagnosing a class that breaks several, refactoring it safely behind tests, and knowing when to stop.

    Intermediate to Advanced7 cards · 5 qnot started