The term “lightweight container” has been en-vogue for a few years now (roughly since Pico/Spring came about). At first it kinda made sense, as they did seem tiny little containers compared to the big beasts WebLogic/WebSphere.
However, I think that the term is actually completely the wrong one. This thought came about as people have been saying:
“Spring is far from a lightweight container. Look at how much crap is available for you! Web/DAO/IoC/TX/AOP/RCP/JMX/Portal/WebFlow…. call that lightweight!!!”
It is true that Spring now has a lot of functionality available in its core, and a ton more hidden in the sandbox.
To me, the point is that Spring lets you apply lightweight development. I don’t need my container to be 10kb for enterprise development, and just be an IoC container. I actually WANT my enterprise container to be able to do the HEAVY lifting, allowing ‘lil ‘ole me to write in a lightweight, POJO based model.
So, I no longer think lightweight container. I think lightweight development.
I hope Spring keeps putting on the pounds as it makes more and more aspects of our development easier.
EJB 3 is a perfect example
EJB 3 is not a more lightweight container. They have just fixed the programming model, but the guts are exactly the same! People didn’t complain about the fact that EJB could grok TX automatically for us, they hated the programming model (Bean/Home/Remote interface etc etc etc).
I agree that EJB 3 is going in the correct direction, in that it is making our development simpler, and POJO based. We have to be careful with what we put in annotations though. I hate to see items like SQL hard coded in there, and ending up with a munge of the XML descriptors right in the bean.
Some items should be annotation driven. Others deserve to be external. Deployment is a big issue for large enterprises, and we need to have lightweight deployment too!