August 2018
Beginner
594 pages
22h 33m
English
A Dependency Injection container, sometimes referred as DI container or IoC container, is a framework that helps with DI. It creates and injects dependencies for us automatically.
It is not necessary to use a DI container in order to take advantage of DI. However, using a DI container makes handling dependencies much easier. Unless your application is very small in size, leveraging a DI container will eliminate the repetitive grunt work of doing it manually. If you were to write some generic code to automate some of it, you are essentially creating your own container when you could use an existing framework built for that purpose. Dependencies go n levels deep and things can get complicated quickly.
If you do opt to use a DI ...