Following the hype around lightweight containers such as
Spring and
Pico, I've been reading up on
Inversion of Control as a design pattern, and how such containers provide IoC. Particularly interesting is how following IoC principles
can aid in automated testing, using
JUnit and
MockObjects, particularly when dependencies on complex backends and integration to third party systems exist.
There are some very useful examples on Pico's website - very nice 1-minute, 2-minute and 5-minute summaries for those with short attention spans! Hugely recommended.
While I do like the ideas behind IoC and agree with the principles, I'm still looking for a real world example using Pico or Spring to achieve this, particularly within a J2EE container like JBoss or BEA's WebLogic.
Oh, and one other thing I learned was that the venerable Singleton is, in fact, an antipattern!! (Whats an antipattern?)