ArjanCodes
9 minutes
The dependency inversion principle (the "D" in SOLID) states that high-level components should not depend directly on concrete low-level components; both should depend on an abstraction that serves as a contract. It requires a language mechanism that separates an interface definition from its implementation, such as abstract base classes in Python, and it reduces coupling so that components can be reused and replaced. This belongs to object-oriented software design, as part of the SOLID principles.