How I understand SOLID Principles

Mohan Ramesh
4 min readJul 4, 2021

SOLID Principles are so fundamental in computer science, but they are so hard to understand! This is the way I understand them and hope it helps others.

History

The theory of SOLID principles was introduced by Robert C. Martin in his 2000 paper Design Principles and Design Patterns.

The SOLID acronym was introduced later in 2004 or thereabouts by Michael Feathers.

Basic Definition

SOLID principles helps in writing good Object-Oriented code.

Applying these principles helps to develop maintainable and extensible code.

We can reduce code smells, refactor code easily and practice good agile development.

SOLID stands for

  • Single Responsibility Principle (SRP)
  • Open-Closed Principle (OCP)
  • Liskov Substitution Principle (LSP)
  • Interface Segregation Principle (ISP)
  • Dependency Inversion Principle (DIP)

Single Responsibility Principle (SRP)

A software entity should have only one reason to change

--

--