Overview

Introduced by Robert C. Martin (Uncle Bob), SOLID is an acronym for five principles that help developers build robust and scalable object-oriented systems.

The Principles

  1. S - Single Responsibility Principle: A class should have only one reason to change.
  2. O - Open/Closed Principle: Software entities should be open for extension but closed for modification.
  3. L - Liskov Substitution Principle: Objects of a superclass should be replaceable with objects of its subclasses without breaking the application.
  4. I - Interface Segregation Principle: Clients should not be forced to depend on interfaces they do not use.
  5. D - Dependency Inversion Principle: Depend on abstractions, not concretions.

Benefits

  • Reduced code coupling.
  • Easier testing and refactoring.
  • Improved code reusability.

Related Terms