Today I investigated the state of application configuration management (J2EE and Java in general) and quickly was tied to the not-so-new but very promising approach called “Inversion of Control” (IoC) and its specific implemention via “Dependency Injection” (DI). There are a huge amount of talks, blogs etc. on this subject. The paper “Inversion of Control Containers and the Dependency Injection pattern” from Martin Fowler helped me to get familar with the principles, the acronyms and key frameworks for IoC and DI – a must-read for Java developers. Another fine paper is Rod Johnson’s “Introduction to the Sping Framework“, posted at TheServerSide.com.
As it turns out, the Java Open Source community offers a lot of IoC/DI containers/frameworks:
- Apache Avalon is fairly heavyweight and complex, and seems more invasive than newer IoC solutions
- PicoContainer is lightweight and emphasizes the expression of dependencies through constructors rather than JavaBean properties
- Jakarta HiveMind
- Spring is general purpose application framework with a IoC/DI container as its core.
Some time ago, Howard Lewis (related with the HiveMind project) wrote a Blog posting “Comparing HiveMind to Spring“. On this blog page there are also other postings on HiveMind and Spring.