Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 855 Bytes

File metadata and controls

23 lines (12 loc) · 855 Bytes

Learn SOLID Principles with CLEAN CODE Examples by @AmigosCode

SOLID PRINCIPLES

1. Single Responsibility

Each class should have only one sole purpose and not be filled with excessive functionality.

2. Open Closed

Classes should be open for extension but closed for modification. In other words, you should not have to rewrite an existing class for implementing new features.

3. Liskov Substitution

This means that every subclass or derived class should be substitutable for their base or parent class.

4. Interface Segregation

Interfaces should not force classes to implement what they can't do. Large interfaces should be divided into small ones.

5. Dependency Inversion

Components should depend on abstractions not on concretions.