S.O.L.I.D Principles

Violating DRY in code ??

S.O.L.I.D is an acronym for the first five object-oriented design(OOD) principles .These principles, when combined together, make it easy for a programmer to develop software that are easy to maintain and extend. They also make it easy for developers to avoid code smells, easily refactor code, and are also a part of the agile or adaptive software development.

  1. SRP The Single Responsibility Principle: β€” a class should have one, and only one, reason to change, meaning that a class should have only one job.

  2. OCP The Open Closed Principle: β€” you should be able to extend a class’s behavior, without modifying it.

  3. LSP The Liskov Substitution Principle: β€” If any module is using a Base class then the reference to that Base class can be replaced with a Derived class without affecting the functionality of the module.

  4. ISP The Interface Segregation Principle: β€” make fine grained interfaces that are client specific.

  5. DIP The Dependency Inversion Principle β€” depend on abstractions not on concrete implementations.

Video Playlist : https://youtube.com/playlist?list=PL9sRG84iY01HXb8BiMghlGG0VH_tENssx

Reference :

Last updated

Was this helpful?