Software Installation

Chapter 1. Getting Started

Topics in This Chapter

  • "Why JavaServer Faces?" on page 3

  • "Software Installation" on page 4

  • "A Simple Example" on page 6

  • "Sample Application Analysis" on page 12

  • "Development Environments for JSF" on page 21

  • "JSF Framework Services" on page 28

  • "Behind the Scenes" on page 30

Why JavaServer Faces?

Judging from the job advertisements at employment web sites, there are two popular techniques for developing web applications:

  • The "rapid development" style, in which you use a visual development environment, such as Microsoft ASP.NET

  • The "hard-core coding" style, in which you write lots of code to support a high-performance backend, such as Java EE (Java Enterprise Edition)

Development teams face a difficult choice. Java EE is an attractive platform. It is highly scalable, portable to multiple platforms, and supported by many vendors. On the other hand, ASP.NET makes it easy to create attractive user interfaces without tedious programming. Of course, programmers want both: a high-performance backend and easy user interface programming. The promise of JSF (JavaServer Faces) is to bring rapid user interface development to server-side Java.

If you are familiar with client-side Java development, you can think of JSF as "Swing for server-side applications." If you have experience with JSP (JavaServer Pages), you will find that JSF provides much of the plumbing that JSP developers have to implement by hand, such as page navigation and validation. You can think of servlets and JSP as the "assembly language" under the hood of the high-level JSF framework. If you already know a server-side framework such as Struts, you will find that JSF uses a similar architecture but provides many additional services.

Note

You need not know anything about Swing, JSP, or Struts to use this book. We assume basic familiarity only with Java and HTML.


JSF has these parts:

  • A set of prefabricated UI (user interface) components

  • An event-driven programming model

  • A component model that enables third-party developers to supply additional components

Some JSF components are simple, such as input fields and buttons. Others are quite sophisticated for example, data tables and trees.

JSF contains all the necessary code for event handling and component organization. Application programmers can be blissfully ignorant of these details and spend their effort on the application logic.

Perhaps most important, JSF is part of the Java EE standard. JSF is included in every Java EE application server, and it can be easily added to a standalone web container such as Tomcat.

For additional details, see "JSF Framework Services" on page 28. Many IDEs (integrated development environments) support JSF, with features that range from code completion to visual page designers. See "Development Environments for JSF" on page 21 for more information. In the following sections, we show you how to compose a JSF application by hand, so that you understand what your IDE does under the hood and you can troubleshoot problems effectively.



Core JavaServerT Faces
Core JavaServer(TM) Faces (2nd Edition)
ISBN: 0131738860
EAN: 2147483647
Year: 2004
Pages: 84

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net