Nov 13, 2008

Spring conference in Paris, part 3

[Updated on 2009/01/09] Videos are available here.

Part 1 & Part 2 already posted. This is the last one.

Here's the transcript of Jurgen Hoeller's presentation on Spring 3.0.

Spring 3.0 themes

  • Java 5+ foundation, compatible with J2EE 1.4 and Java EE 5
  • Spring Expression Language : Unified EL++
  • Comprehensive REST support
  • Declarative model validation : Hibernate Validator, JSR 303
  • Portlet 2.0
Expression Language in bean definitions : dynamic expressions for property values
<bean... >
<property name = “databaseName” value=”#{systemProperties.databaseName}” />
<property name = “keyGenerator” value=”#{strategyBean.databaseKeyGenerator}” />
</bean>

Expression Language in component annotation : dynamic expressions for method parameters
@Repository
public class RewardsTestDatabase {
@Value(“#{systemProperties.databaseName}”)

public void setDatabaseName(String dbName) {... }
}

Conversation management
  • Key problem : isolating concurrent windows in the same browser
    • Shared HTTP session
    • Several independend conversations going on
  • Define scope with a shorter lifetime than session
    • Scope = “conversation”
    • Spring Web Flow will provide sophisticated flow
      navigation management on top of this
REST support : Spring MVC will provide 1st class support for REST
http://rewarddining.com/show/12345
@RequestMapping(value=”/show/{id}”, method=GET)
public Reward show(@UriVariable(“id”) long id) {
return this.rewardsAdminService.findReward(id);
}

Support for different representations
  • JSON : GET http://rewarddining.com/accounts/1.json
  • XML : GET http://rewarddining.com/accounts/1.xml
  • ATOM : GET http://rewarddining.com/accounts/1.atom
Model validation
public class Reward {
@NotNull
@ShortDate
private Date transactionDate;
}
  • In view : <form:input path=”transactionDate”>
  • Description of constraints in the application itself
  • Same metadata can be used for persisting, rendering, etc.
  • Support for Hibernate Validator and Bean Validation (JSR 303)
Spring 2.5 mission continued
  • Fully embracing Java 5
  • Backward compatibility with Spring 2.5
    • 100% compatibility of programming model
    • 95% compatibility of extension points
  • All previously deprecated API to be removed
    • code still working
    • documentation already removed
    • stop using 1.2 / 2.0 API !
Roadmap
  • 3.0 Milestone 1 : end of november
    • new build system
    • first cut of REST and Expression Language
  • 3.0 RC1 : march 2009
    • followed by 2 further milestones
  • 3.0 Final : april 2009
    • depending on RC feedback...


No comments:

Post a Comment