Skip to content

The SOLID Foundation

Modern class design is governed by the SOLID acronym, which provides a roadmap for preparing for change:

  1. S - Single Responsibility: One class, one reason to change.
  2. O - Open/Closed: Extend behavior without modifying source code.
  3. L - Liskov Substitution: Derived classes must be perfectly swappable for their base classes.
  4. I - Interface Segregation: Don't force a class to implement methods it doesn't use.
  5. D - Dependency Inversion: Depend on abstractions (interfaces), not concrete implementations.

Comments