Ruby dependency injection libraries

Jamis Buck, who wrote Copland and Needle, posted here about Needle, dependency injection and their usefulness in a Ruby world.

It’s long but worth reading, but in case you want the single paragraph most relevant to your question, I’d suggest this one, from just before the end:

DI frameworks are unnecessary. In more
rigid environments, they have value.
In agile environments like Ruby, not
so much. The patterns themselves may
still be applicable, but beware of
falling into the trap of thinking you
need a special tool for everything.
Ruby is Play-Doh, remember! Let’s keep
it that way.

HTH

Leave a Comment