3 ms·
Not to sound snarky, but you should read any introduction to dependency injection. The benefits are generally covered very thoroughly, and what you said is not
by oh_sigh 13y ago
Not to sound snarky, but you should read any introduction to dependency injection. The benefits are generally covered very thoroughly, and what you said is not usually considered a benefit.
- kyberias 13y agoWikipedia article on dependency injection, section titled "Advantages", _first_ bullet: "The result is more independent clients that are easier to unit test in isolation using stubs or mock objects that simulate other objects not under test." Would you like to try again?
- oh_sigh 13y agoThe OP said "I mean, what's the point of being able to replace an implementation outside the source code itself." Where, in what you posted, does it reference being able to replace implementations outside of the source code itself? Would you like to try again?