Spring Java framework gets an Edition 6 upgrade

The popular open source tool gains annotation power

Improvements to the opensource Spring Java framework and to a companion web technology focus on annotations, scripting, and Java 6 (Java Platform Standard Edition), say developers of the framework.

Officials of Interface21, which oversees development of Spring technologies, were expected to reveal plans for Spring Framework 2.1 and Spring Web Flow 1.1 two weeks ago. Both were available in a release candidate form at the JavaOne conference, which began in San Francisco last week. Final releases are planned for June.

Having been downloaded three million times, Spring has become popular for Java application development because it combines simplicity and power and can be used in mission-critical applications, says Rod Johnson, founder of Spring and CEO of Interface21.

Themes around the new releases of Spring and Spring Web Flow focus on ease of use and exposing the products to different categories of users, such as those who want to annotate heavily.

Spring’s accommodations for annotations will probably be the most noticeable improvement, Johnson says. Traditionally, Spring has emphasised the use of XML meta-data to externalise configuration data from Java code. But in version 2.1, annotations, which are source-level metadata, can be used.

“Application configuration becomes simpler,” Johnson says.

Use of source-level metadata is akin to adding notes to code, such as to a message declaration or a field. “It doesn’t change how the code executes, but it adds metadata that can be used, for example, by frameworks,” says Johnson.

The key point is some developers like to use XML, but another camp likes to use annotations, says Neelan Choksi, Interface21 vice president. A third camp likes to mix and match, he says.

Annotations was called “a great time-saver and a good productivity feature,” by Brad Shimmin, principal analyst at Current Analysis.

“Annotations have been around for a while, but they’re now just starting to really take off, primarily with the introduction of Java EE (Enterprise Edition) 5 and now enhanced through Spring 2.1,” Shimmin says.

What they do, which is pretty cool, actually, is they let you describe the use and meaning of different objects.”

Java 6 capabilities in Spring 2.1 include out-of-the box support for standard annotations, affecting such capabilities as application configuration and initialisation. Also from Java 6 is enhanced ease of use for Java Persistence API, which offers object-relational mapping capabilities for accessing relational data from a Java program.

Scripting functionality in Spring 2.1 adds support for the Rhino implementation of JavaScript featured in Java 6. With Spring, scripting enables developers to quickly apply container services, such as configuration capabilities and declarative transaction management and security.

“You can apply all those capabilities to components written in any of the supported dynamic languages,” Johnson says. Spring developers thus get the advantage of the Spring component model and the greater ease of use offered through scripting, he says.

Also featured in Spring 2.1 is support for Java Component Architecture for advanced integration between Java applications and systems like mainframes.

Spring Web Flow is a web technology for setting the flow of interactions in applications, particularly in e-commerce systems.

An example would be setting up a series of steps for booking a seat on an aeroplane. Featured in version 1.1 is significantly enhanced integration with JSF (JavaServer Faces). Developers get the full power of the web flow model, Johnson says.

“The benefit of that is that JSF provides a standard component model for Java web development,” says Johnson. JSF is becoming increasingly popular and serves as an alternative to the more traditional template-based approach to web development, he says.

Spring and Spring Web Flow are offered via an Apache licence.

Join the newsletter!

Error: Please check your email address.

Tags Development IDinterface 21Java 6

Show Comments
[]