Dependency injection is a series of tools and methods whose ultimate goal is to help us develop loosely coupled, maintainable, and testable code and programs. The approach to this principle is known as interface-oriented, or abstract-oriented programming.
Dependency injection is a series of tools and methods whose ultimate goal is to help us develop loosely coupled, maintainable, and testable code and programs. The approach to this principle is known as interface-oriented, or abstract-oriented programming.
Dependency injection is more convenient in some cases. You can use it or not. It mainly depends on your own choice to decide whether to use it or not