The SOLID Principles — Dependency Inversion Principle (DIP)
4 min readJun 17, 2023
In the previous two articles (this & this), we discussed the first four SOLID principles: SRP, OCP, LSP, and ISP. In this article, we will continue with the 5th principle which is Dependency Inversion Principle or DIP in short.
Dependency Inversion Principle
The Dependency Inversion principle says two things.
- The high-level modules should not depend on the low-level modules. Instead, both should depend on the Abstractions.