Spring to get upgraded with REST

Evoluindo em REST

Due in late summer, next version will also feature unification in programming model between Spring Web Flow and Spring MVC

The popular Spring Framework for Java development will be fitted with REST (Representational State Transfer) capabilities in an upgrade planned for later this year, the founder of the framework, Rod Johnson, said Thursday at TheServerSide Java Symposium in Las Vegas.

Also, Johnson predicted a changing middleware scene, with a decline in Java application servers. He also touted capabilities in the current release of Spring, Version 2.5, pertaining to capabilities such as annotations.

The planned 3.0 version of Spring, anticipated this August or September, “will have significant enhancements with respect to Web technologies,” Johnson said. Current and previous versions of the open source framework have been downloaded about 5 million times.

“We’re really seeing extensive interest and growth in REST, and it will have comprehensive support for RESTful Web services,” said Johnson, who is CEO of SpringSource, a consulting firm that provides services to Spring users.

Also planned for Spring 3.0 is unification in the programming model between Spring Web Flow and Spring MVC (Model View Controller). “The benefit of that is we will have one single Web programming model from the simplest applications up to the most complex Web interactions,” Johnson said.

In the middleware arena, Johnson anticipates big changes, including a downturn for Java application servers.

“I think we’re basically seeing the decline of the traditional Java EE server,” said Johnson. “If you look at the increased prevalence of lighter-weight solutions like [Apache] Tomcat, if you look at the fact that OSGi allows you to fundamentally structure applications and services in a different way, I think it’s very clear that we’re in for a period of profound change.”

Johnson discussed features of version 2.5, including the greater use of annotations for configuration in the area of dependency injection and Spring MVC. Dependency injection is mechanism in which, instead of an object having to look up its environment to find services, the services are automatically supplied to it by a container environment.

“The fundamental goals of Spring 2.5 were to strengthen Spring’s position as the de facto standard component model for enterprise Java,” as well as build on simplicity and power and make it easier to use, Johnson said.

Spring 2.5 also leverages OSGi, in which JAR (Java Archive) files are OSGi bundles. “OSGi is the best possible modularization,” said Johnson. Also, annotation-driven configuration is featured in version 2.5.

Annotations provide benefits such as reduction or elimination of external configuration but can have drawbacks such as the need to annotate classes, which is not ideal for legacy code, Johnson said.

Two choices are offered for annotation-driven dependency injection in Spring 2.5: @Autowired, a native Spring annotation syntax designed in late 2007, or the @resource model, based on Java Specification Request 250.

A conference attendee cited use of Spring.

“We use Spring for dependency injection,” said Chris Porte, software engineer at WeddingChannel.com. The organization leverages the singleton approach in which an object is instantiated for the entire system, Porte said.

On Wednesday, keynote speaker Neal Ford of ThoughtWorks cited use of Domain-Specific Languages (DSL) as providing an additional level of abstraction in programming. Johnson concurred that they will grow in prominence.

“I think to some degree if you look at what Spring 2 did with introducing a kind of XML namespaces so you can define your own XML elements, it’s almost a DSL,” Johnson said. “I do think we will see increased use of them.”

:arrow: FONTE