The anticipated conclusion to my two part article on how to improve the performance of your JSF-based Seam application by two orders of magnitude is finally available at JSFCentral. I've also released the source code cited in the article.
The promised gains are achieved primarily by leveraging partial page rendering provided by the RichFaces component library and some extra effort to slim down the size of the response. Partial page rendering is Ajax at its finest. It cuts out the main bottleneck of most traditional web applications, which is the overhead of rendering the entire page and its assets, and instead redraws only what is needed as the user interacts with the application. This technique makes the application feel incredibly responsive.
The best part about RichFaces is that it makes partial page rendering so simple that there's really no reason not to use it. Instead of having to write low-level Ajax network calls, RichFaces provides a declarative approach to Ajax. Using either the supplemental Ajax4jsf component tag set or the fully Ajax-aware components in the RichFaces component tag set, you can specify which areas of the page should be updated and the rest is left up to the framework. The normal JSF postback is sent over an Ajax bridge and the Render Response phase supplies the partial page to update.
There's no question, though, that there has been a dearth of good documentation about how to use the RichFaces tags. Fortunately, both a book and reference card have been published recently which should guide you through the myriad of components and settings in RichFaces and help you wield its potential.
Max Katz addresses just how practical RichFaces is in his book Practical RichFaces, published by Apress. This book sorts out the history of RichFaces, guides you through the myriad of component tags and attributes in RichFaces, and allows you wield its potential. You learn that Ajax and JSF are a good fit for one another and the combination allows you to do Ajax without having to suffer the headache of coding JavaScript and dealing with browser inconsistencies. I recently had a chance to read the book and afterwards posted my review on Amazon. It's my recommendation that if you are using RichFaces, you should definitely take the opportunity to read this book.
If you need a reference to have on the go, then grab a copy of the DZone RichFaces Refcard (PDF), authored by members of the RichFaces project team. This card helps you keep the RichFaces and Ajax4jsf tags sorted and reminds you of the many attributes from which you have to choose.
To see examples of how to use RichFaces and Seam together, then check out chapter 12 of Seam in Action.
If you want to be able to retain the attention of your users in this fast paced world, which has a ever diminishing tolerance for long page loads, you should always consider using Ajax in your application. RichFaces offers a great way to get started. Another excellent JSF component library to consider if you want to add partial page rendering to your application is ICEfaces. In fact, it's arguably simpler to use because it automatically determines which areas of the page to update based on deltas in the component tree. So you have two good options to get started.
OK, OK, I know that this is the home turf of RF but please do have a look at ICEfaces also which reached its 1.8 stable release very recently ;-)
Nik, don't feel timid. Your absolutely right. ICEfaces is also an excellent Ajax-based JSF component library and I recommend it just as much as RichFaces. In fact, you could argue it makes partial page rendering even easier to do since it calculates what needs to be redrawn based on deltas in the component tree. For some reason, RichFaces still feels the most comfortable to me day to day, but that might be because I appreciate the little bit of extra control it gives me (in exchange for doing more work).
Yep, sometimes it's a little scary to have stuff done automagically for you and not really having the option to override if things get... non-linear ;-)
Competion is good and where it comes to JSF based component sets (beyond the simple ones included) there is really no standard (apart from the AJAX interface in JSF 2) so there is plenty of room for innovation. Not that following a standard hinders innovation built on top but it does set some boundaries...
I'm really looking forward to the standard Ajax bridge in JSF 2.0 because I feel it will give me more freedom as a developer to mix and match components as I need them. Out in the field, I have been burned on several occasions from not being able to pull in a rich component from another library that was missing from the component set I was using. Components sets always seem to be about 95% of what we need ;)
I just filled in the link to my review of Practical RichFaces on Amazon.