20.04.2013 Views

Practical RichFaces, Second Edition

Practical RichFaces, Second Edition

Practical RichFaces, Second Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 1 THE BASICS<br />

When Starting with JSF, Keep an Open Mind<br />

It’s not difficult to find forums, blog posts, and other resources from people who are just starting with<br />

JSF and are dissatisfied with the framework. You must remember that most people who are starting with<br />

JSF are coming from JSP, Struts, or a similar homegrown framework. When they start evaluating JSF,<br />

they bring the same style and development approach to JSF that they used with JSP and Struts. This is<br />

where all the problems start.<br />

You can’t take that approach and use it with JSF. It provides a whole different paradigm to web<br />

development—as we’ve explained. The user interface is developed from UI components; it’s very<br />

different from what people are used to doing with JSP and Struts. So when someone tries to do simple<br />

things in a “JSP way” in JSF, they fail and get frustrated. He might say, “But I could do this in JSP in about<br />

five minutes.” Of course, he or she probably could, but JSP is not really doing anything more than mixing<br />

Java and HTML. JSP provides so little abstraction that you can do basically anything—even if in most<br />

cases it isn’t done correctly, the key is that it was still accomplished one way or another.<br />

This approach doesn’t work anymore in JSF. Before you become dissatisfied with JSF, it’s important<br />

to spend at least some time learning the framework and understanding how it works before actually<br />

evaluating it for a project. Put your JSP or Struts approach aside for a second, and learn how to build web<br />

applications using UI components. We promise that you will have much more success with JSF this way.<br />

Summary<br />

This chapter briefly introduced JSF, Ajax, and <strong>RichFaces</strong>. The goal was to give you a general picture of<br />

how all these technologies fit together. In Chapter 2, you’ll install the tools you’ll use in this book, and<br />

then you will jump into using one of the first <strong>RichFaces</strong> tags, .

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!