Java Reference
In-Depth Information
Chapter 12
JavaServer Faces
In this chapter, we will explore the Java application framework called JavaServer Faces (JSF). In addition to
learning some of the new JSF classes, the advantages of the JSF architecture will be explained and the tutorials will
demonstrate how quickly a JSF application can be generated with a minimal amount of coding.
We will also introduce Service Data Objects (SDO), database connections, and scripting variables and
demonstrate the advantages and limitations of using these new tools for accessing databases.
At the end of this chapter, you should understand:
The JSF framework
Facelets
Pagecode classes
Database connections
Navigation Rules
The SDO Relational Records and Relational Record Lists
Scripting variables
Links and parameters
You should be able to:
Define and use a database connection
Create a JSF application that:
displays data from a database table
uses JSF components and SDO to insert and edit data in a database
JSF Overview
Do you feel that things have gotten very complicated? Well, they have! (Model, view, controller, database access and
all the classes that are needed to do it, JSPs, servlets, Web pages, tags, tag libraries, Web Deployment Descriptors,
URIs, etc.) It almost makes you long for the good old days of client-based applications. To simplify and standardize
applications, new “frameworks” such as Struts and Java Server Faces (JSF) have been introduced. Frameworks impose
a “standard” for defining and organizing an application's components (classes, Web pages, JSPs, etc.) and include
new technology (i.e., Facelets, enhanced visual components, navigation rules, scripting variables) to quickly create an
application. For example, both Struts and JSF come with new Java classes and tools that make implementing the MVC
architecture easier and with fewer errors. Although the Struts framework is a very useful and has been around longer
then JSF, the JSF framework is the direction of the future.
 
Search WWH ::




Custom Search