Even a chimp can write code

Wednesday, April 21, 2004

Spring is here

There are as many web frameworks out there as web applications -- well almost. Most reinvent the wheel everyday. So when I read Rod Johnson said "Spring does not reinvent the wheel", I sat up and read further. In his excellent introduction to the new Spring Framework, the author of "Expert One-on-One J2EE Design and Development", lucidly lays down the features of a framework that makes the management of business objects its central focus. It comes out as a framework of mini-frameworks, each relying on Inversion of Control.

I like the myriad goodies it provides for the business layer:

  • a robust implementation of business objects and a way to wire them together;

  • wrappers for data access that take the pain out of JDBC [as the bard said, "Parting is such sweet sorrow!"] or plug O/R solutions like Hibernate and JDO right in;
  • a generic transaction management that isn't tied to any specific environment [I close my eyes and imagine thousands of developers who write JTA code giving thumbs ups on this one]


Besides Spring aims to provide J2EE services to Plain Old Java Objects (POJOs) using the much-touted AOP approach. [We will look at Aspect Oriented Programming in a future weblog]. Before you jump and say "But JBoss already does that", let me remind you that Spring provides this feature across application servers, thus avoiding vendor lock-in. There is also a powerful MVC web framework, quite like Struts with none of the Struts flaws. There is a clean division between the Model, the View and the Controller and the use of IoC prevades into this area as well tying it with other parts of the framework. Yes, I have really taken a liking to Spring. There's a lot of activity on its website [http://www.springframework.org]. Definitely worth a good look.

Email this | Bookmark this