|
|
|
|
|
by camus2
4613 days ago
|
|
Everytime you pass arguments to a constructor or a method,if the parameter is itself an object you will call a method on (message passing), you are doing dependency injection. So it's a fancy word for a basic idea. The OP is talking about an IoC container or a service locator. which is a tool that will wire up and build objects on demand according to a definition. The alternative is writing factories( ex : document.createElement("DIV") is a factory method ). |
|