December 5, 2008 1 Comment
Simplifying JavaServerFaces Development with Spring Faces – Jeremy Grelle
I was running quite late, by the time I was in for this session, Jeremy was out of the slides and busy switching between Eclipse code and the demo web-app. He was covering the “Spring centric” JSF integration approach where you use JSF backed by Spring MVC. And you can use Spring WebFlow to control stateful conversations and navigation rules.
I have used Spring WebFlow 1.0 in the distant past and I it certainly looks like the WebFlow 2.0 syntax is much simpler. It is very much a comprehensive DSL for all kinds of things though and I would guess there is a bit of learning curve. I could spot flashes of the upcoming Spring 3.0 EL++ within the on-screen webflow XML samples, e.g. “bookingService.findHotels(searchCriteria)”. Spring WebFlow appears to encourage doing as much as possible declaratively in the config. Jeremy was recommending that for e.g. instead of implementing action listeners in java code (which is nothing but “glue” code) – just do this directly in the flow definition. This is optional of course, and existing action listeners would continue to participate in the JSF life cycle as normal.
There were a couple of hiccups during the demo which Jeremy recovered from, at one point he wondered out loud if the view did not refresh as expected because of JSF quirks – keeping the whole UI component tree in memory etc.
Client / Server Application Development using JSON SOA/REST – Kris Zyp
- Service Mapping Description (SMD) – like WSDL for JSON / REST but with far less suck
- JsonRestStore – Dojo has a “Data Store” concept that standardizes an interface or set of APIs to read, write and even scroll through data. JsonRestStore is a data store implementation that can automatically use a given RESTful JSON service, provided it conforms to some conventions.
- JSON Schema – like XML schema but without teh suck
- Bayeux – like JMS for the web – or asynchronous messages over HTTP
- REST Channels – like eventing and pub-sub for the web
Spring Cleaning: Tips for Reducing XML in Spring Configuration – Craig Walls
One of the rare sessions at SpringOne coming from an experienced user rather than a Spring committer. The author of “Spring in Action“, Craig has obviously lots of experience with Spring and I did pick up a few tips. I actually attended two of his sessions back to back hoping to be cured of my allergy to annotations :) This first one covered some basics like using attributes instead of <value>, the “p” namespace, bean inheritance, property editors etc – but it appeared to be quite relevant for the audience. For e.g. I was surprised by the show of hands that not many people had seen the transaction proxy factory bean. Looks like everyone is onto namespaces and annotations nowadays.
The before and after effects for simplifying declarative transaction management were quite convincing and even more convincing was the effect of the Acegi to Spring Security makeover. Spring Security has come a long way indeed :) Craig was pretty emphatic that this is the “best security framework around, period”.
Session ended with how AOP becomes simpler using annotations instead of XML and finally a quick look at JavaConfig. One nice tip I got out of the session is that Jasypt could be used to encrypt externalized config properties like the database connection password.
Spring for the Angle-Bracket Averse: Developing Spring Applications with Absolutely No XML – Craig Walls
That was the last session in SpringOne 2008 (for me) and that’s a long title for a session :) Craig started with a quick look at some alternative contenders like Springy – I had never heard of this (but it is dead now) and the Groovy based Bean Builder. Then he dived into a sample application all done in JavaConfig with zero XML. And no, web.xml doesn’t count. Craig spent time in the IDE, making it clear how this way of configuration could appeal to a Java programmer, you get the benefits of IDE navigation, auto-complete, syntax coloring, type safety, OO, etc. Of course, there are a few annotations to remember and lots of @@@@ symbols in your code. But I guess many people would prefer this to angle brackets and this is just configuration anyway. Session ended with Craig strongly recommending that one should just try JavaConfig once, quite likely you will get hooked. The message was clear that people who used to say Spring sucks because of so much XML just can’t complain anymore.
Update: Solomon has blogged an overall “big picture” summary of SpringOne: http://jroller.com/Solomon/entry/spring_one_themes
Update: InfoQ has a summary report on SpringOne: http://www.infoq.com/news/2008/12/springone-2008