Dependency inversion principle
The dependency inversion principle is part of the SOLID principles that were established by Robert C. Martin. The purpose of the SOLID principles is to provide some guidelines to developers on how to design code in a way that is more understandable, flexible, and maintainable. The dependency inversion principle, in particular, affirms that a high-level component should not depend directly on an individual component that is concentrated on a precise procedure (low-level component); instead, they should depend on an abstraction. Therefore, abstractions should not depend on any implementation details.
A low-level component usually performs simple operations and provides simple functionalities. A high-level component, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access