JBoss Seam developer. Current tools/APIs: JSF, Facelets, Richfaces, JBoss AS, EJB3, JPA, Hibernate, Eclipse. Arbi has posted 6 posts at DZone. View Full User Profile

JBoss RichFaces 3.3 Book Review

01.26.2010
| 10357 views |
  • submit to reddit
Published by: Packt
ISBN: 978-1847196888

Reviewer Ratings

Relevance:
5

Readability:
5

Overall:
5

Buy it now

One Minute Bottom Line

This book is a very good introduction to JBoss RichFaces and offers some additional material that is not available in Practical RichFaces (coverage of CDK).  The book relies too heavily on Seam conversations, injections, seam-gen and other JBoss-specific technologies like Hibernate Validator.  It provides good background on AJAX and good examples as well as a decent contact management example along with source code.  Read up on JSF, Seam, JPA, Maven and Hibernate Validator prior to reading this book.  Recommended.

Review

JBoss RichFaces is a rich AJAX component library for JSF allowing your Java web applications to become “Web 2.0-enabled” without writing JavaScript code.  The latest stable version as of this writing is 3.3.2.SR1.

This review is on “JBoss RichFaces 3.3” by Demetrio Filocamo.  The book was published November 2009.  The target audience is Java developers who want to add AJAX functionality in their web applications without writing JavaScript.  Some experience with JSF and Seam would be very helpful and considered prerequisites for this book.  You will need Eclipse 3.4.2 (Ganymede) or 3.5.x (Galileo) to use the JBoss Tools plugins.  JSF 1.2 and Facelets is also required.  There is some usage of Maven.

What I liked:

Overview and history of RichFaces is provided.  Overview of the RichFaces framework is covered including Ajax Filter, Ajax Action Components, Ajax Containers, Skinnability, RichFaces JavaScript Engine.  This overview is essential prior to starting with the example project for contact management.  The contact management application is based on a data model that consists of six entities or tables.

I learned something I did not previously know about RichFaces: XML-formatted CSS (XCSS) and that it is used a lot in the Plug-n-Skin skinnability feature.

As an experienced JSF/RichFaces developer, I appreciated the advanced topics in this book.  These include creating a new skin, advanced techniques and Component Development Kit.  What I liked most about this book is the subject of the RichFaces Component Developer Kit (CDK).   This topic is not covered in Practical RichFaces.  Although it may be true that a JSF/RichFaces developer may not need to create their own custom components, it’s definitely good to know how CDK works and what it offers.  So the author covers how to develop a star rating component.  In the meantime, we learn about pom.xml configuration files and Maven.

The author spent adequate time covering two of the most popular and useful components: a4j:support and rich:dataTable.  He also explained the differences between h:dataTable and rich:dataTable and covered other important data iteration components like rich:dataScroller.

There was also coverage on how to minimize unnecessary form processing via ajaxSingle and process attributes usage.  It’s possible to have a use case in which one HtmlSelectOneMenu component dynamically refreshes the data for another HtmlSelectOneMenu component (e.g. country and state drop-downs).  In these kinds of cases, you can use ajaxSingle or process attributes to avoid all components in the form to be processed in the JSF lifecycle phases, therefore achieving a performance optimization.

A snippet was provided on the bypassUpdates attribute and how it can be used with a4j:support validation scenarios as a performance optimization (the Update Model and Application JSF lifecycle phases are not invoked).

Along the way, the reader will get some exposure to Hibernate Validator, Seam and Maven.

What I disliked:
One of the major pain points when using RichFaces with JSF/Seam is the 'The conversation ended, timed out or was processing another request' error.  This is typically handled by configuring the concurrent-request-timeout attribute of the Seam manager component in components.xml as well as using the appropriate eventsQueue and requestDelay attributes for your a4j: and rich: components.

Therefore, I was surprised to see no coverage of a4j:queue component.  This tag has been available since RichFaces 3.3.0 and is essential in any RichFaces developer’s toolkit.  Refer to the references section of this book review for more info on this tag.

The book was using and relying on too many JBoss Seam integration examples rather than being technology agnostic (e.g. you can use JSF/RichFaces with Spring).  For example, there are references to seam-gen, which is a Seam tool that allows you to create a project skeleton and reverse engineer your data model to JPA entities, Seam conversations, Seam page navigation and Seam Captcha.

No captions for the pics.  This seems to be a problem with the Packt series of tech books (the Packt Seam book I reviewed had the same issue).

Pictures are not always clear (poor resolution).  Formatting of the xhtml/tags in the facelets was subpar or difficult to read.  Various typos throughout the book.

Little on performance optimization techniques (although this is an advanced topic).  JSF/RichFaces/Seam is known to have performance problems which are being addressed in JSF 2 and RichFaces 4.  One of the main problems is the fact that in AJAX there is a lot of XML text passed over the wire in the AJAX request/response cycles.  When compared to Adobe Flex’s AMF3 binary protocol, this is a disadvantage in terms of performance and processing and handling large amounts of data per request.

How to improve:
Add a section on performance optimizations.  Fix typos.  More coverage on JSF2 and RichFaces 4.  Minimize Seam integration and/or introduce some Spring integration examples.  Add a4j:queue coverage.

In closing, this book is a very good introduction to JBoss RichFaces and offers some additional material that is not available in Practical RichFaces (coverage of CDK).  The book relies too heavily on Seam conversations, injections, seam-gen and other JBoss-specific technologies like Hibernate Validator.  It provides good background on AJAX and good examples as well as a decent contact management example along with source code.  Read up on JSF, Seam, JPA, Maven and Hibernate Validator prior to reading this book.  Recommended.

Additional reading:

 

 

Published at DZone with permission of its author, Arbi Sookazian.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Swati Viswanathan replied on Mon, 2010/02/01 - 11:54pm

For more information, please visit: JBoss RichFaces 3.3

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.