« Burn TiVo, Burn | Main | Google Maps API »

June 27, 2005

JSF Woes: Asynchronous Events

I previously blogged on what I thought were some shortcomings of the whole JSF architecture. In that entry I made some suggestions that I thought would make JSF more appealing, one of those was an AJAX-like asynchronous event mechanism.

I use this map component that has been JSF-ified. You can pan, zoom, recenter, etc. it's really quite slick. The different controls are arranged in a toolbar where you select a specific tool to perform that function when you click on the map. For example, I can select the zoom-in tool, click on the map and the map display will zoom in. The problem is that when I click on the zoom tool an event is triggered, which means the whole page needs to be updated. Not a great experience. Because of this change in tool I make a whole round trip to the server that incurs a definite lag in productivity.

A better solution to this problem would be having the tool buttons make asynchronous calls to the server to see if a layout change or a change in components would occur. If a change would happen then just reload the components that changed, not the whole friggin' page.

Of course many have thought about this before now and have offered proprietary solutions to fill the gap. Most notably AjaxFaces [ajaxfaces.com] that offers the following solution:

The CyberXP.NET AjaxFaces offers an easy, general and complete integration solution for JavaServer Faces and Ajax. This solution makes any JavaServer Faces UI component Ajaxable: either trigger Ajax process or change user interface using the output from Ajax process.

Haven't tried them out, but it looks promising.

Posted by Guy at June 27, 2005 7:45 AM