I am evaluating technology stack for the next project â€“ migration of a perl implementation to a java solution. I like some ideas implemented Seam, especially the pageflows and conversation scopes â€“ but I have problems with the â€žOne size fits allâ€œ-Architecture (it is not fitting). So I was planning to have a look at webflow, and just in time, Keith Donald has posted a very good â€žWebflow JSF Howtoâ€œ on the Spring blog.
It is adressing to things I missed most in JSF â€“ better navigation handling and providing conversional scopes.
He also states what is coming next, like EL support and pushing the webflow scoped beans into Spring 2.0 configuration â€“ I am looking forward to that!
So with some Spring best practices, JSF, Webflow and facelets we are pretty close to what I looking for, without a need of a embeded Java EE microcontainer (is it production ready?) .
I am still missing the extended persistence scope. E.g., Seam uses two transaction scopes â€“ one for the business layer (defined by session, entity beans,â€¦), and a second (this time read-only) for the rendering in the presentation layer (jsf componentsâ€¦). It is a good idea, it solves some problems with the OpenSessionInView solution without giving up lazy loading:
Yes, this is actually a better implementation of this pattern. One database transaction is used to read and write data during the processing of the request event. The second database transaction is only used to read data, during rendering of the view. No modifications to objects are made at this point. Hence, database locks are released early in the first transaction, allowing better scalability, and the second transaction can possibly be optimized (e.g. some databases require read-only transaction settings for best cleanup after transaction commit). To use two transactions you need a more powerful interceptor than a simple servlet filter â€“ AOP is a good choice. The JBoss Seam frameworks uses this model.