SOLID is an acronym that stands for the following:
- Single responsibility principle
- Open/closed principle
- Liskov substitution principle
- Interface segregation principle
- Dependency inversion principle
This states that a class should have a single responsibility, but more than that, a class should only have one reason to change.
In the open/closed principle classes should be open for extension, but closed for modification. Essentially meaning that classes should be extended to change functionality, rather than being altered.
Created by Barbara Liskov in a 1987, this states that objects should be replaceable by their subtypes without altering how the program works. In other words, derived classes must be substitutable for their base classes without causing errors.
This states that many client-specific interfaces are better than one general-purpose interface. In other words, classes should not be forced to implement interfaces they do not use.
This states that classes should depend upon abstractions, not concretions. Essentially, don't depend on concrete classes, depend upon interfaces.