Search code examples
dependency-injectionnaming-conventionsinversion-of-controlconventions

Why is an IoC/DI container called a 'container'?


I'm just trying to understand where the label 'container' came from. Anyone know?

Seems like many things could be called 'containers'.


Solution

  • Because it serves as container for objects. It is the framework that manages their lifecycle. It is responsible to instantiate, resolve references and destroy them.