Pre-JCP-filed draft for JavaServer Faces 2.0 JSR

Sun has gone public with a pre-JCP-filing of the JSR for JavaServer Faces 2.0. I've given it a quick skim and am very very excited about it. I've been working with JSF for a few months now and have uncovered several major issues for the projects I work on. Since then I realized why there are several frameworks built on top of JSF such as Shale, Seam and Visual Web Pack. Sun has gone through all of frameworks built on JSF including bolt-on modules such as facelets and AJAX libraries, and is going to build it all into the JSF standard. This means that any Java EE application server you use will have this incredible web framework built in, ready for you to develop with.

Here are some of the major highlights (from my point of view):

  • Real world, production view description technology, including templating: include something influenced by Facelets, JSFTemplating or Tiles in the specification.
  • Allow for bookmarkable JSF pages. More broadly, if HTTP GET can be used, it should be used.
  • Provide a mechanism to minimize the "Lost Update" and "Duplicate Button Press" problems.
  • Strategic additions to the Standard HTML RenderKit: Calendar, Tree, Tab View, Captcha, Login Panel, File Upload components.
  • Enable components that publish events via RSS/Atom.
  • Allow for "zero configuration" web applications. No faces-config.xml, no web.xml. If necessary, annotations will be used to supplement the configuration data.
  • Expand the request processing lifecycle to be aware of Ajax. This may include describing a small developer-contract footprint JavaScript library as part of the JavaServer Faces specification. (They also mention a number of other features that make AJAX seamless)

We need this now!! It's kind of funny because it seems like JSF 2.0 fixes problems that other web frameworks have never had, and adds features that other web frameworks already have. I'm sticking with JSF because it is the JSR standard and for the most part I do like it. JSF 2.0 solves all the issues I have with it.

It looks like they don't plan on releasing the final draft until mid-end of 2008 when Java EE 6 is released :/ That feels like an eternity to me. Knowing Sun, they will be working on a reference implementation well before the final draft is released. I'm sure NetBeans' Visual Web Pack will make full use if JSF 2.0 at some point too.

I had a couple of specific comments about the JSF 2.0 spec that were not mentioned. I found a place to comment on the requirements: the JSF 2.0 Requirements Scratchpad document. I've added the following points:

  • Regarding HTTP GET support, external systems should be able to do an HTTP GET or POST request to a JSF form that executes the action. For example, an external system wanting to pass in data for two fields of a search form and execute the search action to go directly to the results screen.
  • Make sure that developers targeting mobile devices aren't forced into downloading tons of JavaScript and CSS for every page the way Visual Web Pack theme files do. Mobile web apps need very small HTML output, and there is very limited CSS and JavaScript support.
  • Examine Oracle JDeveloper's JSF support for mobile devices. It appears that for each page being developed you can create a view for desktop computers and a view for mobile devices. They might even provide browser detection for displaying the correct view. Being able to develop a single JSF 2.0 web app that can target both desktop and mobile devices would be invaluable.

Comments:

Post a Comment:
Comments are closed for this entry.