Dependency Inversion

Dependency Inversion

What is Dependency Inversion principle?

It means that dependencies should always go in one direction only: from high-level components with the business rules and entities through the interfaces to the low-level components like frameworks and databases. In practical terms: no business logic should ever be dependent on technical implementation and its frameworks, databases, interface, or anything else.

Pasted image 20231027120405.png

Example

Relates to

References

Dependecy Inversion Principle Explained