Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dependency Injection Addiction?

Is there a down side? I feel almost dependent on it now. Whenever a project gets past a certain size almost feel an allergic reaction to standard patterns and immediately re-wire it with a Dependency Injection framework.

The largest issue I've found is it can be confusing for other developers who are just learning it.

Also, I'd feel much better if it were a part of the language I was using. Though, for Java at least, there are a couple very lightweight libraries which are quite good.

Thoughts? Bad experiences? Or just stop worrying about it?


[EDIT] Re: Description of Dependency Injection itself

Sorry for being vague. Martin Fowler probably describes it FAR better than I ever could... no need to waste the effort.

Coincidentally, this confirms one point about it, that it's still not widely practiced and might tend to be a barrier when working with teams if everyone is not up to speed on it.

like image 442
Mark Renouf Avatar asked Sep 03 '08 22:09

Mark Renouf


1 Answers

I've taken a stab at describing some of the possible downsides in a blog post here: http://kevin-berridge.blogspot.com/2008/06/ioc-and-di-complexity.html

like image 94
Kevin Berridge Avatar answered Nov 26 '22 05:11

Kevin Berridge