JavaRanch Home    
 
This page:         last edited 07 February 2007         What's Changed?         Edit

Spring Framework   

Rod Johnson's Spring framework (http://www.springframework.org) grew out of the design philosophy and framework classes described in his J2EE Design and Development book -- a truly exceptional book, by the way, which comes highly recommended (ISBN 0764543857).

Spring is a framework from someone who knows how to write frameworks, and that is a rare breed indeed. It is lightweight, generally well thought out, does not intrude on your classes and it's pluggable at every corner. Integrating third party code with it is usually a doddle. It supports complexity but keeps simple things simple -- cool new features are judged by their cost/benefit ratio before inclusion.

Most people's reference point for frameworks is the StrutsFramework. If you would compare the two, you will find that their philosophy, scope and depth are totally different.

  • Spring is an application framework, not just a web application framework.
  • Spring covers all layers of the application -- including such things as Inversion of Control configuration, EJB support, a JDBC library, Hibernate integration, declarative transaction support and AOP -- and is not just an MVC implementation.
  • At the same time, it does not try to do implement as much view functionality as Struts does, relying instead on its easy integration with other tools such as the JSTL or Tapestry or indeed with any custom code that you might want to write.
  • Spring's breadth and flexibility can make it hard to pin down; rather than imposing a single monolithic straitjacket structure on you, it adapts to your needs and supports all code that you write. It does not force you to buy into all of the framework, but encourages you to use the bits that you need.

Check Spring out. It's currently in its pre-1.0 milestone release, but most of the codebase is stable, having been in production use for quite some time. Documentation is available but needs some work to cover the most recent features. --- PeterDenHaan


JavaRanchContact us — Copyright © 1998-2014 Paul Wheaton