This post originated from an RSS feed registered with Ruby Buzz
by Jamis Buck.
Original Post: Needle 0.9
Feed Title: the buckblogs here
Feed URL: http://weblog.jamisbuck.org/blog.cgi/programming/index.rss
Feed Description: Jamis Buck's corner of the blogging universe. Mostly about ruby, but includes ramblings on a variety of topics.
I released Needle 0.9 this morning. It is (hopefully) the last unstable release of Needle, with 1.0 being scheduled for unveilment next Thursday (the 4th of November).
One thing I’ve come to realize as I prepared for this latest release is something that Jim Weirich already pointed out in his now-famous DI article. Dependency Injection is a superset of Service Location. Thus, Needle is not only a DI container, it is also a service locator container.
In the current version of the Needle users manual, I devoted a chapter to this idea. Chapter 3 uses Needle as a service locator, and then Chapter 4 builds on that to show how dependency injection differs from it.
With Needle approaching maturity, it’s been exciting to see people sampling it. Even David Heinemeier Hansson (of Ruby on Rails fame) has expressed an interest to understand dependency injection better. He is looking for ways to decouple certain parts of the Rails framework, to make functional testing simpler. (After chatting with him, it looks like the service locator pattern is a better fit in Rails than full-blown dependency injection, but it was still an enlightening discussion.)