Question

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

Seems like many things could be called 'containers'.

Was it helpful?

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.

OTHER TIPS

In order to differentiate it from a factory, which doesn't keep instances alive.

Probably because it "contains" object definitions (and manages object creation and destruction).

What's in a name.

The word collection is intended to hide the implementation of a collection or container of things. You can't call it a list, array or stack because those are specific kinds of implementations. Collection would also work but Container is the word that caught on.

Because it sounds friendlier than framework.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top