Dependency injection

It is one of the techniques of the inversion of control, and the purpose is to relieve a service from the responsibility of having to know how to construct itself. Instead, the service shall delegate this responsibility to an external service (injector) which will construct it with the necessary dependencies.

The dependency injection, hence, helps with implementing the separation of concerns design principle.

Dependency Injection
Register
Register
Register
Resolve
Inject
Inject
Inject
Injector to resolve providers with its dependencies and inject
Container
Provider
Provider
Provider
Provider instance
Provider instance
Provider instance

Container

The container is that component where providers declarations are registered in order to be resolved in a second time whenever its injection are requested.