I was musing today about some things I’ve seen in Clojure and their relationship to dependency injection in Java, etc. I wanted to draw the connection and then see what people in the Clojure community thought about it.
I’ve used dependency injection in Java for a long, long time both with and without DI frameworks. [...]
Dependency injection is probably not as widely useful as regular expressions but is pretty pervasive these days in most applications built on Java EE, Spring, or Guice.
Recently, Google (most prominently Bob Lee and Guice) teamed up with SpringSource (most prominently Rod Johnson and Spring) to propose a JSR for standardizing dependency injection annotations [...]
If you happen to be in St. Louis and would like to see a great talk on Guice, look no further than the St. Louis JUG, which will be hosting a talk from my good friend and colleague Scott Bale, which is described further here. I really wish I could go just to see [...]
I’ve had a couple interesting discussions recently about dependency injection and type safety. In particular there is a new article up discussing type safety in the Butterfly DI framework. I think Jakob makes some good points and argues well that perhaps too much is made of the lack of type safety in Spring [...]
There is a JavaPosse interview with "Crazy" Bob Lee from JavaPolis that went up recently that is very interesting [audio, video]. The first big chunk of the interview is about Guice and that’s good stuff, but not what caught my ear. At about the 21:00 mark (or section 9 in the video), they [...]
The two most common forms of dependency injection are constructor injection and setter injection. They’ve got pros and cons of course, and both have their place. Setter injection is simple, allows you choose which parts of the object to inject, can make setting up bidirectional relationships easier, but has the downside that it’s [...]
This entry inaugurates a new series on patterns that I hate. Hate is a strong word, perhaps a better name would be “patterns that I’ve frequently seen lead to ruin”. But that seemed too long.
Anyhow, the singleton pattern is the hands-down #1 pattern that can lead me to froth at the mouth. [...]
I was just reading up on SCA (Service Component Architecture) and was struck by how well this matches my view of how software components should be assembled within an app as well. I touched on pieces of this quite a bit in my “Designing with Dependency Injection” presentation a while back but it has [...]
This is a response to Bob’s blog regarding Spring.
In my opinion the benefits that IoC / DI bring should be the focus, not the various frameworks that have sprung up (pun intended) to ingrain it into your apps. If you follow the principles of DI, it makes your code amenable to many different frameworks [...]
In response to Cedric‘s blog on how he doesn’t get IoC, Keith has a really nice summary on why IoC is useful as a principle and what facilities an IoC container should provide. To me, this is the critical thing: IoC is a useful design principle, regardless of whatever opinions you have about the containers [...]
There was a great question during my dependency injection presentation on the difference between dependencies and the state of an object. In retrospect, I think I didn‘t answer it very well, so I‘d like to take another stab at it.
I quite commonly separate the attributes of a class into three categories:
Dependencies – typically resources required [...]
This week I gave a presentation at the St. Louis Java User’s Group called “Designing with Dependency Injection”. The presentation focused on the design and architecture impacts of using dependency injection.
If anyone is interested, the presentations are available here for either Keynote or Powerpoint. Be sure to check the notes as the slides are mostly [...]

Hi! My name is Alex Miller and I live in St. Louis. I write code for a living and currently work for