SOLID – an acronym, which stands for 5 components:
- Single Responsibility Principle.
A class should have only one task (responsibility), which it takes care of.
- Open/Closed Principle.
It should be possible to extend class functionality without modifying it.
- Liskov Substitution Principle.
Base classes should be substitutable by their derived classes.
- Interface Segregation Principle.
Client specific interface is better than one general purpose interface.
- Dependency Inversion.
Depend on abstractions, not on concretions
This is a list of main Object Oriented Software design principles. It is important to follow them if you want to build software, which is easy:
It refers not only to OOD, but with some sense of interpretation can be referred to microservices, components of different granularity. Please drill into each of principles to check for details and examples.