News for hackers. Stuff that matters.
Re:Dependency Injection is a Virtue by dgregd on Monday January 07, 2013 @06:46AM (#5020563)
Someone asked Java DI related question. All answers were dogmatic.

http://stackoverflow.com/questions/131975/what-are-the-benef...

I tend to think that sometimes guys choose (or are forced to choose) solutions like configuration xml files over source code files just to keep quiet all these inquisitors.

Re:Dependency Injection is a Virtue by flyinRyan on Wednesday January 09, 2013 @09:08AM (#5031506)
I didn't see any concise answers there so I'll say why I use this a lot at work:

- If I use Spring.Net I never have to put stupid trace logging on any functions but I get it for free. I make one change in the XML config files and suddenly every function for every inject object has full tracing turned on.

- Getting new code installed into production is a huge drama/pain but changing a config file doesn't have the same level of bureaucracy.