Rails Transparent Dependency Injection

jmw wrote in post #1027063:

I was reading over an archived post http://david.heinemeierhansson.com/arc/000357.html

Just curious, was there any traction on this for 3.x?

As far as I understand it, Needle (Ruby DI) was pretty much abandoned once the developers themselves understood that DI in Ruby simply wasn't necessary. At least not in the same way as in Java land. Yes, DI is a big deal in a static language such as Java, but not so much in dynamic languages.

I did some experimenting on my own related to DI in the context of dynamic OOP languages. I came to the same conclusion. While the Inversion of Control (IoC) pattern is trivial in a language like Ruby, there really isn't a need for a whole framework (e.g. Spring) to support it.

However, having said all that this battle will likely rage on, even though DI has pretty clearly lost on this particular battlefield so far.

Robert Walker wrote in post #1027387:

jmw wrote in post #1027063:

I was reading over an archived post http://david.heinemeierhansson.com/arc/000357.html

Just curious, was there any traction on this for 3.x?

As far as I understand it, Needle (Ruby DI) was pretty much abandoned once the developers themselves understood that DI in Ruby simply wasn't necessary. At least not in the same way as in Java land. Yes, DI is a big deal in a static language such as Java, but not so much in dynamic languages.

This explains the point I was trying to make much better than I can:

http://rubyconf2008.confreaks.com/videos/recovering-from-enterprise-large.mp4