4 ms·
The author doesn't seem to understand where to use DI and where to use a Container. DI is used in the context of library code. E.g. the main business logic cod
by pan69 12y ago
The author doesn't seem to understand where to use DI and where to use a Container.
DI is used in the context of library code. E.g. the main business logic code library. This allows you to Unit Test your business logic.
A Container is used at an application level, i.e. the application that uses the business logic library. Maybe you're using a web framework. It's then the web framework that has ownership of the container. I.e. framework + business logic = application.