Ashkan Nourzadeh

SOLID Principles

Single Responsiblity Principle (SRP)

A class should have only one reason to be changed.

Open-Closed Principle (OCP)

A class should be open to extension but closed to modification.

Liskov Subsitution Principle (LSP)

You should be able to replace a class with a subclass without the calling code knowing about the change.

Interface Segregation Principle (ISP)

Many specific interfaces are better than a single, all-encompassing interface.

Dependency Inversion Principle (DIP)

Code should depend upon abstractions, not concrete implementations.

Notes

Resources