3 ms·
The conclusion is a lot more moderate than the title, the author actually uses dependency injection: While DI has benefits in some circumstances, such as shown
by nicksellen 11y ago
The conclusion is a lot more moderate than the title, the author actually uses dependency injection:
While DI has benefits in some circumstances, such as shown in the Copy program, I do not believe in the idea that it automatically provides benefits in all circumstances. This is why I consider that the application of DI in the wrong circumstances should be considered as being evil and not a universal panacea or silver bullet. In fact, in the wrong circumstances it could even be said that Dependency Injection breaks encapsulation. Although I have found some places in my framework where I have made use of DI because of the obvious benefits it provides, there are some places where I could use DI but have chosen not to do so.
I think using the word evil is far too dramatic, evil should mean do not ever use.
- BurningFrog 11y agoSo all he's saying is that using DI wrong is wrong?
- xtrumanx 11y agoWell at least he didn't title it "Dependency Injection Considered Harmful".
- jschwartzi 11y agoArticles Titled Considered Harmful Considered Harmful