Nov 14

Spring 2.5 RC2 out, Includes new Spring MVC Tutorial

Tag: java, springpmularien @ 7:36 am

Spring 2.5 RC 2 has been released today, and in addition to the expected bug fixes, this release includes a fully updated version of the venerable Spring MVC Step-by-step tutorial (finally!).

It doesn’t seem that this update has made it to the main springframework.org site yet, so for now the new tutorial is only available as part of the Spring downloadspring-framework-2.5-rc2-with-docs.zip” - look in the docs/MVC-step-by-step directory.

Reading through the tutorial, it is definitely much more up-to-date and verbose. Kudos to Thomas, Rick, and Portia on their efforts - this is much better than the Spring 1.x version of this document! Major improvements include:

Unfortunately, there’s still a couple things that I feel are lacking.

The tutorial seems to have been written without consideration for the new annotation-based configuration introduced in Spring 2.5 - indeed, there’s nary a mention of annotations (except for the ubiquitous @Override) in the entire document. I’m not sure why this is, considering that claims of easier annotation-based configuration have been common in Spring 2.5 announcements and even on the Interface21 blog.

Secondly, while it’s great that an extensive example has been built using Tomcat, in the real world, things are much more complicated. From spending a lot of time helping users in the Web section of the Spring forums, it is obvious that people have trouble setting up Spring on a variety of application servers that are commonly used in production (Weblogic, Websphere, etc.). It would be nice if the common app servers were at least given cursory mention.

Sadly, there’s still no coverage of the use of property editors and how they affect form binding. This is a common source of confusion as well, even among Spring veterans. Even a simple example of binding a Date would save a lot of confusion. Actually, expanding the form section into a couple more complex examples (including select and checkbox tags, please!) would be extremely helpful.

Finally, while it’s not strictly in the purview of Spring to document issues with JSTL, my observation is that a lot of Spring MVC newbies are at the same time first experiencing the pleasure of JSTL. There is a lot of confusion around how to declare taglib references, how webapp version affects taglib declaration, support for different versions of JSTL on different app servers, etc. It would be great if the Spring web documentation (or tutorial) listed common problems related to JSTL (vote for my bug!). This would save hours of frustration by Spring newbies, who simply don’t have the skills (yet) to debug what might be wrong when simple JSTL evaluation doesn’t work on their pages.

Anyway, it’s still nice to see some movement here from the Spring team, and I hope the tutorial continues to be improved and expanded.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">