Dependency Inversion Principle
Source: Mostly based on Robert C. Martin article Engineering Notebook columns for The C++ Report.
Definition
As whole SOLID principles, also Dependency Inversion Principle comes to the world thanks to the Uncle Bob (Robert C. Martin). The most common principle definition what you can find in the Internet are those two points:
- High-level modules should not depend on low-level modules. Both should depend on abstractions.
- Abstractions should not depend on details. Details should depend on abstractions.