In object oriented languages, an inversion of control container (ioc-container) can be used for configuring and managing objects in an application.
In object oriented languages, an inversion of control container (ioc-container) can be used for configuring and managing objects in an application. The container is responsible for managing object lifecycles (creation, initialization, destruction) and configures objects by wiring them together.
Objects managed by the container obtain references to other objects (their dependencies):
- by explicitly asking the container, using dependency lookup methods on the container
- automatically, because the container injects the dependencies using one or more dependency injection techniques
Frameworks that provide an ioc-container support one of these methods and often both.
The following frameworks are discussed here at Stackoverflow
For .NET:
For Java: