1541-4922/05/$31.00 © 2005 IEEE
Published by the IEEE Computer Society
JavaServer Faces: An Excellent Learning Tool
JavaServer Faces provides an excellent starting point for using the new framework from Sun with JavaServer Pages, Java Servlets, and JavaBeans. This book is particularly valuable to those from an ASP.Net background, who so often get books that look at just one small piece of the Java 2 Enterprise Edition framework.
JSF is a component-based model for Web development that helps you build real-world applications and create your own server-side user interfaces for the Web. JSF is a new technology designed to simplify creating Java Web applications by making them work more like typical graphical user interface event-driven applications; thus, the details aren't all finished. For example, JSF is still missing the ability to generate custom errors for validation.
Author Hans Bergsten clearly explains the JSF user-interface framework as a new standard that will make building user interfaces for J2EE applications easier. He shows how it handles events, authentication, and navigation; how it works with tabular data, input validation, and internationalization; and how it enables and disables buttons, among other useful topics. Bergsten also explains how to extend existing JSF components to build custom components. I enjoyed some chapters and topics, such as the multiform UI section and the one in which Bergsten shows how to plug custom renderer code into JSF. The latter section shows that he recognizes JSF's shortcomings and how to fix them. I also liked the way this book answered many questions that arose while I read it—questions most developers don't even know to ask.
About two-thirds of the book covers JSF in-depth. The last third, the appendices, gives a concise O'Reilly-style reference for the components, with many examples that highlight main ideas.
The all-inclusive book covers:
• Introducing the JSF environment in-depth
• Creating and rendering components
• Validating input
• Handling user-generated events
• Controlling page navigation
• Working with tabular data
• Integrating JSF and Struts
• Developing custom renderers and custom components
You'll learn to use UI components to integrate JSF with JSPs, ensure that your stored data fulfills your application's business rules, and move your application from Struts to JSF. If you already use a server-side framework such as Struts, you'll find that JavaServers Faces uses a similar architecture but is more flexible and extensible.
Bergsten is a leading contributor to the JSF specification. That could be the reason why almost half of the book's content looks similar to Sun's free online documents.
JSF is here to stay, and this book gets you started. It's primarily a learning tool for JSF with a fair amount of reference material thrown in. I particularly recommend the book to newcomers to the technology, but it's still a valuable reference for those already familiar with JSF.
Héctor Zenil Chávez
is a mathematician from the National University of Mexico (UNAM). Contact him at email@example.com; www.zenil.notrix.net.