4 ms·
This is not at all the definition of Dependency Injection. The wikipedia article [1] does a pretty good job of describing what it really is. DI is a pattern th
by msmith 16y ago
This is not at all the definition of Dependency Injection. The wikipedia article [1] does a pretty good job of describing what it really is. DI is a pattern that is intended to reduce coupling between components in a large system. It applies to any OOP language, although it is true to say that the term first gained popularity in the "enterprise" Java world.
I also think it's wrong to conflate DI with XML. One of the first major DI frameworks, Spring, did use XML for configuring and wiring-up components, but it's also quite popular to do this part purely in the code, without any external configuration files.
[1] http://en.wikipedia.org/wiki/Dependency_injection http://en.wikipedia.org/wiki/Dependency_injection
- masklinn 16y ago> This is not at all the definition of Dependency Injection. Re-read fleitz message. He never stated what he believed DI to be but what he believes DI to be used for. > I also think it's wrong to conflate DI with XML. Which, again, is not what he said at all.
- msmith 16y agoTo be honest, I didn't really understand what he was trying to say, but I am certain that the first two problems he mentions are not what DI is intended to solve.