Per wikipedia, SOLID is an acronym for 5 design principles in object-oriented-programming. These principles are:
- Single Responsibility
- Liskov Substitution
- Interface segregation
- Dependency Inversion
A class/interface should have one and only one responsibility.
Classes should be open for extension, but closed for modification.
AKA Design by contract.
All objects that conform to a given interface should be treated as interchangeable.
It’s better to have 20 different interfaces/protocols, than 1 god interface/protocol.
Depend upon interfaces, not a specific concrete implementation.