DEV Community

SCHREIBER Christophe
SCHREIBER Christophe

Posted on

SOLID Principles in 1000 characters

SOLID Principles are 5 concepts described by Uncle Bob to improve software design quality in object oriented programming:

  • Single Responsibility Principle: group together the components (classes, modules...) that will change for the same reason
  • Open-Closed Principle: software should allow easy extension (opened) without needing to change existing code (closed to modification)
  • Liskov Substitution Principle: every subtype of a given type can be used wherever the parent type is required
  • Interface Seggragation Principle: one interface for one purpose, a component should only depend on components/behaviors it requires to fulfill its purpose
  • Dependency Inversion Principle: components should depend on abstractions, not implementation details

These principles help the software to be easier to maintain, evolve and test, and are considered good practices and lead to a cleaner architecture.

SOLID principles are to design and architecture what Clean Code is to code writing.

Top comments (0)