The SOLID principle

SOLID is an acronym coined by Michael Feathers for the following 5 design principles published by Robert Martin, to guide the developers when doing OOP (Object Oriented Programming) and code design:

S: Single Responsibility Principle

A class should only have a single responsibility, that is, only changes to one part of the software's specification should be able to affect the specification of the class.

Read more: S: Single Responsibility Principle [ UNDER CONSTRUCTION ]

O: Open/Closed Principle

Software entities should be open for extension, but closed for modification.

Read more: O: Open/Closed Principle [ UNDER CONSTRUCTION ]

L: Liskov's Substitution Principle

Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.

Read more: L: Liskov's Substitution Principle [ UNDER CONSTRUCTION ]

I: Interface Segregation Principle

Many client-specific interfaces are better than one general-purpose interface.

Read more: I: Interface Segregation Principle [ UNDER CONSTRUCTION ]

D: Dependency Inversion Principle

Depend on abstractions, not on concretions.

Read more: D: Dependency Inversion Principle [ UNDER CONSTRUCTION ]


Other articles:

The SOLID principle

Single responsibility principle

Open/closed principle

Interface segregation principle

Dependency inversion principle