Dependency Inversion Principle explained
5 min readMay 28, 2021
Dependency inversion principle (aka DIP) is defined as follows:
A. High-level modules should not depend on low-level modules. Both should depend on abstractions.
B. Abstractions should not depend on details. Details should depend on abstractions.
It is really easy to find this definition on the Internet. I guess most readers heard about it and some even know it by heart. Unfortunately, it is pretty vague and it takes quite some time researching to get it. This is why I decided to write this article.