The principle focuses on the following two parts:
- 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.
First of all, what is a high-level module and a low-level module? In short, high-level modules contain business rules, and low-level modules contain the implementation details.
According to the first part of this principle, high-level modules should only be concerned with high-level abstraction. This high-level abstraction defines what the components are, what the interactions between these components are, and what business rules these components must follow. Low-level modules ...