19 november 2009

Devoxx 2009 - Day 4: Spring 3.0

They reserved the largest room for the Spring talk. They always do... Spring has been a successful topic on Devoxx since its first version. This year Arjen Poutsma cane to give us an update on what was implemented in Spring 3.0; an update because last year he was here to announce what would be in it. Apparently Arjen went through a little makeover since last year :) Check for photo's of last year if you weren't there. The development is done, now they're distributing beta versions. The final version should be available "really soon now".

Spring 3.0 should be concidered as a drop-in replacement for Spring 2.5. That means that it should be fully backwards compatible with Spring 2.5n with some additional features. Spring now makes full usage of the Java 5+ features, like generics, annotations and var-args.

in the past Spring got the complaint to be "XML only'. Now that has changed: you can still use XML (for your legacy applications) and you can use annotations. Now the usage of Spring-specific annotations in POJO's might not be the best choice: this way you make your POJO's directly dependent of Spring annotations. Alternatively, you can use Java config instead: keep your POJO's clean, but isolate the config of the bean instantiations in separate classes.

Expression Language has been in Spring Webflow for a while now. But the new Spring release will exploit the EL capabilities in all the framework components since they moved EL to the core.

The biggest change is in the web, with the introduction of REST and URI templates. You can use templates (in {placeholders}) in the URI's and these can be mapped to variables in your controller code.

REST enforces a clear hierarchy in you data structure. By applying this instead of request parameters you can also fully exploit the http protocol (make full usage of caching features of proxies and servers).

REST supports http-methods GET, PUT, POST and DELETE. Browsers however - for the time being (this may change with HTML 5) - only support GET and POST. Spring can use a hidden http method. This means that your browser does a POST, but that you specify a hidden DELETE. The framework will interprete the hidden method.

ETags are used in combination with caching: the ETag marks the changed status of a resource. This is better that the LastModified value, because ETags can deal with multiple changes per second (lastModified cannot).

Spring 3.0 now supports the Portlet 2.0 spec. Apparently hardly anyone seemed to bother... Maybe our business does? This means that Spring now supports inter portlet communication.

JSR-303, bean validation (as part of the JEE6 spec) also sees an implementation in Spring 3.0. Speaking of JEE6: Spring 3.0 already supports the following JEE6 specs in their current state:

  • JSF 2.0
  • JPA 2.0
  • JSR-303 (bean validation)
  • JSR-330 (dependency injection), to which they contributed strongly

Spring is not competing with JEE 6. The add value to the JEE 6 spec where relevant. And as of Spring 3.1 they will fully support JEE 6 (to be expected 2Q 2010).

The following features got pruned:

  • pre-Java 5 "annotations" using xDoclets
  • Native TopLink support (contributed by Oracle), replaced by JPA

 

And the following specs are deprecated:

  • MVC controller hierarchy
  • JUnit 3.8
  • Struts 1.x

 

Release date of Spring 3.0 is not defined yet, but it will definitely by after the finalization of the Java EE 6 spec.

16:53 Gepost door There's more to life than what you see through windows in Javapolis | Permalink | Commentaren (0) | Tags: devoxx09, spring 3 0 |  Facebook |

De commentaren zijn gesloten.