Principles and Architecture / Dependency Injection
Dependency Injection Container
Original notes by SunDiaL · View English source
A DI Container is Indirection applied to the Composition root, and it becomes the Creator in GRASP. It is a class whose purpose is to manage dependencies and their lifetimes.
Object Lifetime Scope
Lifetime Scope is extending the meaning that Scope had for simple variables. The meaning shifts from "how long is a variable alive/visible" to "what kind of life should this dependency (object/class) have". "Life" here means "instancing strategy":