BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Spring Web Flow Enhances JSF Navigation and State

Spring Web Flow Enhances JSF Navigation and State

This item in japanese

Bookmarks
A long standing complaint with Java Server Faces is the navigation support. Ignacio Coloma documented his frustrations last fall:

...The start was simple: the component/renderer/validator/converter model is clean and easy to get up and running. The validation model works like a charm, JSP pages are quite minimal and you can get a working skeleton of your application in a snap. Then the hell of linking pages together starts...

Noted web application developer Matt Raible commented on JSF last week as well:

...If you're going to use JSF, I highly recommend Facelets or Shale/Seam ... There's two problems with Shale and Facelets - the activity on these projects is very low. Shale still has its creators around, so even while its seldom used, you can probably still get your questions answered. However, Facelets seems to be suffering from "developer abandonment".

Conclusion: don't use JSF simply because it's a "standard". Use other frameworks that are more actively developed and designed for the web. For component-based frameworks, the most popular are Tapestry and Wicket. Less popular ones are RIFE and Click. If you still want to use JSF, you should probably use Seam, but don't simply use JSF because it's a standard...

Companies are actively working to fix and enhance JSF however with JBoss' Seam being based on JSF and Spring Web Flow providing JSF support. Recently Interface21's Keith Donald detailed how Spring Web Flow integrates with JSF to provide a better model for implementing navigation logic and managing application state:

    As a JSF extension Spring Web Flow takes over navigation rules and managing the state associated with user interactions (a.k.a conversations). JSF developers benefit from enhanced navigation model. In summary Web Flow adds:

    • The ability to implement dynamic navigation rules that are changeable on-the-fly without a server restart
    • Full forward, backward, refresh, redirect, and recursive navigation capabilities built into its flow definition language
    • Modularization and encapsulation of navigation logic through the flow definition concept

    In respect to state management Web Flow adds conversation, flash, and flow state in addition to JSF's standard request, session and application.

Commenting on Donald's article Matt Raible remarks:

...I think it's interesting to note that both Interface21 and JBoss are doing a lot to build solutions to JSF's problems. Is there money to be made from supporting JSF? In reality, you have to like what both companies are doing: they're building solutions to overcome the shortcomings of JSF and they're contributing those solutions back to the community for free. Even cooler is the fact that both companies are trying to get their solutions into the next version of JSF. This benefits everyone as far as I'm concerned...

Rate this Article

Adoption
Style

BT