7 of 7 people found the following review helpful:
4.0 out of 5 stars
The missing manual on RichFaces, April 4, 2009
This review is from: Practical RichFaces (Paperback)
For as big an impact RichFaces and Ajax4jsf have had on JSF adoption, there's no question that there has been a dearth of good documentation on the subject. So how practice is RichFaces, really? That's the question Max Katz answers in his recently released Apress book, Practical RichFaces. At last, the missing manual has been discovered!
If you have ever perused the RichFaces documentation, you'll agree that it leaves out the bigger picture of how RichFaces works, in particular the underlying Ajax4jsf mechanism (i.e., the behavior provided by <a4j:support>). I can attest to the observation the author states in the introduction that a lot of developers are using the tags and attributes from RichFaces without a clear understanding of their purpose and, as such, only arrive at a working application through trial and error. After reading Practice RichFaces, and keeping it close at hand, you can finally put those painstaking steps aside and know what you are doing from the start.
The book starts out with one of the most clear and concise explanations of JSF that I have come across. 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.
The author then sets the record straight about the origins of RichFaces and its relationship with Ajax4jsf. You learn that there is a clear distinction between the tags in the a4j: and rich: namespaces. Specifically, the a4j: tags provide page-level Ajax support whereas the rich: tags provide component-level Ajax support. As you learn about both tag sets, you begin to appreciate how easily you can add Ajax and partial page updates to your application using RichFaces. You can practically feel yourself maturing as a developer and eager to start adding more sophisticated user interfaces that give your application a desktop feel.
If you are seeking answers to specific questions you have about certain Ajax4jsf tags, I can assure you that you will find them in this book. Let me cite a couple of examples. Early on in the book, the author provides an explanation as to why content that was not rendered on an initial request cannot be rendered during a partial page update without a placeholder. This is a common problem that comes up as soon as the developer tries to use Ajax for input field validation. There is good coverage of the ajaxKeys attribute for updating individual rows in a UIData component, a very compelling feature of RichFaces in terms of performance. You also learn how to use the <a4j:include> tag to create a wizard in a single-page application while still being able to leverage the JSF navigation rules.
Most important of all, you learn about the multitude of options you have to control the Ajax request, such as explicitly marking which regions of the page to update or instructing a region to update itself automatically on any Ajax request, adding an activity indicator to show when an Ajax request is in progress, submitting only a part of the form (i.e, processing only a subset of UIInput components on the server), bypassing model updates, queuing Ajax requests to avoid flooding the server, and discarding duplicate page updates. You even learn how to create a JavaScript function which behind the scenes executes a method on the server and subsequently performs a partial page update, separating the Ajax4jsf mechanism from any one component.
Although I have been using RichFaces for several years, I learned many things about RichFaces and even corrected some mistaken assumptions I had.
You are constantly reminded in the book that skinning is covered in chapter 11, almost to the point where you want to just skip to the chapter and get it over with. The coverage of skinning is pretty good, though a thorough explanation of the XCSS files and how they tie into the theme is sorely missed. There are other important areas of RichFaces that didn't make it into this book. There is no coverage of the drag and drop components nor, as mentioned earlier, the resource delivery framework. The section on developing a custom tree is fairly thin and, coming from experience, it turns out to be a lot more difficult than it appears. So while this book serves as a vital resource for understanding the fundamentals of how RichFaces works, there is still room for a book further along in the progression.
Despite providing a clear picture of how RichFaces works, the book has a number typos, broken grammar, incorrect code formatting, and mixed up code and diagram references, sadly a shortcoming of the RichFaces developer documentation as well. Likely you'll be able to read around the mistakes, though, and understand what was intended. I just wish more care had been taken to polish the manuscript and the code listings.
While Practical RichFaces is an excellent resource if you are developing an application using RichFaces, or you want to add Ajax capability to an existing JSF application, do not expect to find the information you need if you are planning to develop custom RichFaces components. The book lacks coverage of the RichFaces Component Development Kit (CDK) and the excellent resource delivery mechanism in RichFaces that supplies the assets (images, JavaScript, CSS) needed by the rich components. For this reason, the target audience of this book should be identified as the application developer, not the component developer, citing roles defined in the JSF specification.
As well as the author does explaining the concepts, tags, and tag attributes in RichFaces, the fact remains that RichFaces has several bizarre tag and attribute names that cause confusion for the developer. One example is the <a4j:keepAlive> tag. Keep-Alive is an HTTP header that specifies to the browser how to control the connection. But the tag has nothing to do with this header. This tag stores the value resolved by a value expression in the UI component tree so that it's available on postback. This is just one example of how RichFaces is a bit rough around the edges. I'm hopeful that RichFaces 4 will align the excellent concepts in RichFaces under a better naming strategy. Of course, given that the names are not always intuitive, it makes this book an even more critical resource to you as a developer.
Looking beyond these technicalities aside, it's my recommendation that if you are using RichFaces, you should definitely take the opportunity to read this book.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
3 of 3 people found the following review helpful:
4.0 out of 5 stars
A good start, perhaps the next edition will be even better, June 6, 2009
This review is from: Practical RichFaces (Paperback)
I want to thank Max and crew for providing RichFaces, which is a great tool. I have used RichFaces on multiple projects and anticipate many more.
This book is not too bad. Happily, there is not much attention given to explaining Ajax or JSF/JSTL which has already been well addressed by other books. Also (a plus) it doesn't bulk up the page count by including the RichFaces documentation.
As other reviewers have mentioned, this book supplies a fair amount of missing detail. Good as far as it goes, but IMO it doesn't go far enough and this is why I only gave 4 stars.
File upload only recieved a few lines in the book, which is a surprise. I also thought the list components could have used more attention w/converters.
If you code using RichFaces it is helpful to skim this book. Hopefully the next edition will have more examples.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
3 of 3 people found the following review helpful:
5.0 out of 5 stars
Great book, May 23, 2009
This review is from: Practical RichFaces (Paperback)
This book was even more than what I expected from it.
I have been working on a RichFaces for about a couple of months now, and I was really surprised how well everything I was missing got "connected". This practical/hands-on focus on solving real-world situations is what I really expected from this book, and it was totally fullfilled.
I liked the examples, and was able to follow them (even the ones with typos =P).
I also liked the communication skills from the author, making the reading really straightforward.
Thanks Max for your effort!
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No