In association with heise online

23 February 2009, 07:33

Spring 3 is in the air - a first look

Spring 3 moves to Java 5 / JDK 1.5 and gains REST support

by Eberhard Wolff


Spring 3 – has been announced, prompting us to ask Spring expert Eberhard Wolff to take a first look at the Java framework's general new orientation. The most attractive features are likely to be its Java 5 support as well as the integration of the REST architecture and an expression language.

The story so far...

The project was launched in 2002, largely to simplify the Java development process – especially for Enterprise Java applications. Since 2004, it has been available under the Apache Software License. It has become the basis of numerous projects and has profoundly changed the Java development landscape. The framework is now developed by SpringSource (see glossary), a company which also employs all the framework's committers.

Spring has had a particular impact in three areas:

  • Dependency Injection (see glossary) allows objects to have references to each other. As the objects themselves are passive, they can easily be replaced – for example for testing, or to port applications to different run-time environments like OSGi and Java EE.
  • AOP (aspect-oriented programming) can be used to add aspects like security, or transactions, to an application, without having to change the application itself.
  • Spring simplifies many existing APIs like Hibernate, JDBC (Java Database Connectivity), and JMS (Java Message Service).

Truly new?

One of the basic components of the new Spring is the version of Java it supports: The framework now requires Java 5, or JDK 1.5. Spring is known for generally tending to use a conservative approach, and supports old standards that are still in production use. JDK 1.4 has now reached the end of its productive life, and moving away from this version is, therefore, only a natural consequence. Even those who choose to be very cautious in their software choices are now required to upgrade to JDK 1.5, because Sun Microsystems will no longer support previous versions.

Java 5 has introduced a whole range of new features into the language and this has had a great impact on the everyday use of Java. The new features include annotations and generics, as well as less well-known concepts, like varargs, which allows methods with a flexible number of parameters. It is, therefore, easy to assume that the support of JDK 1.5 in Spring 3 will bring about considerable changes for framework users. But this is not the case, because versions 2.0 and 2.5 already used Java 5 features, so that Spring 3 will only require minimal changes. As a result, the effects of this modification are, for developers, hardly noticeable.

Next: Clearing up

Print Version | Permalink:
  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit