JavaServer Faces, First Impressions

Andrew Hallam | | 26 June 2005, 02:09

JavaServer Faces (JSF) is one of the technologies that are being used in a web development project that I’m involved in. After using it for about two months we’ve found that it doesn’t fit our needs as well as we’d like.

The reason that we chose to use JSF (version 1.1_01) in our current non-spatial web application was that it is the Java web application framework that ships with ArcGIS Server’s Application Developer Framework. We were planning to use JSF for web mapping applications built on ArcGIS Server. Using it for a straight forms-based business application seemed like a good way to get familiar with it. (More thoughts on using JSF for web mapping applications in a later post.)

The main issue I have with JSF is that it can make it difficult for your web application to follow the principles of the Web. For instance:


  • Pressing the back button in the browser is almost guaranteed to break the application. This is apparently going to be fixed in the next release of JSF, but the JSF 1.2 specification is in “early draft”, with no ETA on a usable product. In the meantime, telling users not to use the most used button on their browser is not an option.
  • JSF uses HTTP PUT for all forms processing and navigation links. Clicking on a link actually submits a form rather than using HTTP GET to retrieve a resource. This means that you cannot bookmark web pages, or have the application email someone a URL that opens a web page displaying a particular resource.
  • The JSP pages that you create are tag-soup. Each JSF user interface component is responsible for rendering its own HTML. The only way to view the final HTML output is to run the application and use View Source.

With some research and clever coding we could probably work around some of these issues, but web frameworks are supposed to make your life easier. Not more difficult.

JSF is being actively developed, and has the support of some large vendors (Sun, Oracle, etc). This is encouraging, but it is also of concern. These vendors are focused on delivering tools that support JSF, and the next two revisions of JSF are more focused on supporting tools rather than developers.

This situation has similarities with the WS-* stack of web service standards – a bunch of big vendors creating standards that they then use as the basis for building commercial tools. I remain unconvinced.

»

Commenting is closed for this article.

|

Powered by Textpattern | Tranquility White made TXP-ready by Textpattern Templates