Book Review: Core JavaServer Faces, Second Edition

Authors: David Geary – Cay Horstmann

Publisher: Sun Microsystems Press

ISBN: 978-0131738867 (Click to buy from Amazon)

Although JSF was first released in March of 2004, it has become more popular only recently. There are several reasons for the increased popularity:

1. Version 1.2 of the spec both adds some needed functionality and has a new, less buggy reference implementation.

2. The presence of new frameworks such as Ajax4JSF and ICEFaces, which add ajax functionality to JSF applications without the developer having to hand code any javascript.

3. New integration frameworks, such as Seam. One of the knocks against JSF was the fact that it seemed to add back in all the XML that we got rid of with EJB3, but Seam takes care of that.

To use the new frameworks, you’ll need a solid background in the theoretical aspects of JSF, with less time devoted to all the configuration options, since the integration frameworks will take care of that for you. Unfortunately, earlier JSF books took the opposite approach–configuration accounted for a great deal of their content. Fortunately, this book, published after the new frameworks came out, spends a great deal of time on explaining the reasoning behind the design of JSF, and how you can use that knowledge in your own application, and how the new frameworks tie into JSF. Armed with this theoretical knowledge, the authors can also explain the reason behind some of the limitations of the various frameworks. Configuration options are still covered, but in a more succinct way.

The most important theoretical piece of information to know about JSF is the lifecycle of a request–

  1. Restore view
  2. Apply request values; process events
  3. Process validations; process events
  4. Update model values; process events
  5. Invoke application; process events
  6. Render response

One of the advantages of JSF over other, earlier frameworks is that the phases have been explicitly defined and exposed to the developer. The authors take the phases as their guide for how to explain JSF, and this approach works well, as they show what you, the developer, can do at each phase to help accomplish the goals you have for your application.

For now, this is the book to get if you are working with JSF in any capacity.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s