4 ms·
So why not just pass its dependency as a constructor argument?
by wtetzner 13y ago
So why not just pass its dependency as a constructor argument?
- snikeris 13y agoPassing a dependency as a constructor argument is dependency injection: http://en.wikipedia.org/wiki/Dependency_injection#Constructor_injection http://en.wikipedia.org/wiki/Dependency_injection#Constructo...
- wtetzner 13y agoRight, my point was more "why do you need a framework to call constructors for you?".
- UK-AL 13y agoThat's what IoC containers do, or via setter. However a IoC container can automatically create, and send through the object based convention(IMessageQueue -> MappedTo -> MessageQueue) or configuration (IMessageQueue -> MappedTo -> APMQMessageQueue).