SOLID principles – Part 5: Dependency Inversion Principle
This is the fifth of a five part series, where I go over the 5 principles which make up the SOLID principles by Robert C. Martin.
The fifth one is D: Dependency Inversion Principle (DIP)
This principle states two things:
- High-level modules should not depend on low-level modules. Both should depend on abstractions.
- Abstractions should not depend upon details. Details should depend upon abstractions.