Dependency Injection Rediscovery

Posted January 04, 2008 in Programming

So I was getting my daily dose of coding news and started reading about Wicket, since I’ve heard a lot about it lately. Well, the Wicket release page mentions Google Guice, so I ended up watching a presentation about how Guice handles Dependency Injection. Well, half-way through the presentation I realized/remembered just how similar this is to the old Taligent “”http://www.cubik.org/mirrors/taligent/Docs/books/WM/WM_18.html">Let Resources Find You" mantra:

If you need to use another object, let the client give it to you—don’t find it yourself.

Perhaps just Nothing New Under The Sun… Like Fowler’s article on Inversion of Control pointing to an old JOOP article that mentions the concept in 1988 (search for “inversion of control” in the article text). Or how Fowler also explains Inversion of Control being similar to the Hollywood model (I first remember reading about this in the C++ FAQ book [not in the online version], but he digs out a paper on The Mesa Programming Environment that mentions it much earlier).

P.S. Googling for “taligent dependency injection” I came across this lengthy article about separation of concerns and just had to add it to the post. Haven’t had time to read it, but it seems well written and researched.