Dependency inversion
Section titled “Dependency inversion”Dependency inversion is the principle that high-level policy should depend on stable abstractions instead of directly depending on low-level implementation details.
The implementation then depends on the abstraction required by the policy boundary.
This direction lets infrastructure vary without forcing the core policy to know provider or framework details.
Related knowledge
Invert dependencies around policyKeep high-level policy from depending directly on replaceable low-level implementation details when that separation has engineering value.
Architecture boundaries and dependency directionDefine boundaries around distinct responsibilities and make dependency direction protect the decisions that should remain independent.