Tuesday, 8 April 2014

Java server faces technology

Java Server Faces Technology
 

Java Server Faces technology is a server-side component framework for building Java
technology-based web applications.
Java Server Faces technology consists of the following:

■ An API for representing components and managing their state; handling events,
server-side validation, and data conversion; defining page navigation; supporting
internationalization and accessibility; and providing extensibility for all these
features
■ Tag libraries for adding components to web pages and for connecting components
to server-side objects
Java Server Faces technology provides a well-defined programming model and various
tag libraries. The tag libraries contain tag handlers that implement the component
tags. These features significantly ease the burden of building and maintaining web
applications with server-side user interfaces (UIs). With minimal effort, you can
complete the following tasks.
 

■ Create a web page.
■ Drop components onto a web page by adding component tags.
■ Bind components on a page to server-side data.
■ Wire component-generated events to server-side application code.
■ Save and restore application state beyond the life of server requests.
■ Reuse and extend components through customization.

This chapter provides an overview of Java Server Faces technology. After explaining
what a Java Server Faces application is and reviewing some of the primary benefits of
using Java Server Faces technology, this chapter describes the process of creating a
simple Java Server Faces application. This chapter also introduces the Java Server Faces
life cycle by describing the example JavaServer Faces application progressing through
the life cycle stages.
The following topics are addressed here:
■ What Is a Java Server Faces Application?
■ Java Server Faces Technology Benefits
■ A Simple Java Server Faces Application
■ User Interface Component Model
■ Navigation Model
■ The Life cycle of a Java Server Faces Application

 ■ Partial Processing and Partial Rendering
■ Further Information about Java Server Faces Technology
 


 What Is a Java Server Faces Application?
 

The functionality provided by a Java Server Faces application is similar to that of any
other Java web application. A typical Java Server Faces application includes the
following parts:
■ A set of web pages in which components are laid out
■ A set of tags to add components to the web page
■ A set of managed beans, which are lightweight container-managed objects
(POJOs). In a Java Server Faces application, managed beans serve as backing beans,
which define properties and functions for UI components on a page.
■ A web deployment descriptor (web.xml file)
■ Optionally, one or more application configuration resource files, such as a
faces-config.xml file, which can be used to define page navigation rules and
configure beans and other custom objects, such as custom components
■ Optionally, a set of custom objects, which can include custom components,
validiators, converters, or listeners, created by the application developer
■ Optionally, a set of custom tags for representing custom objects on the page

 

 Java Server Faces Technology
 

Java Server Faces technology is a server-side component framework for building Java
technology-based web applications.
Java Server Faces technology consists of the following:
■ An API for representing components and managing their state; handling events,
server-side validation, and data conversion; defining page navigation; supporting
internationalization and accessibility; and providing extensibility for all these
features
■ Tag libraries for adding components to web pages and for connecting components
to server-side objects
Java Server Faces technology provides a well-defined programming model and various
tag libraries. The tag libraries contain tag handlers that implement the component
tags. These features significantly ease the burden of building and maintaining web
applications with server-side user interfaces (UIs). With minimal effort, you can
complete the following tasks.
■ Create a web page.
■ Drop components onto a web page by adding component tags.
■ Bind components on a page to server-side data.
■ Wire component-generated events to server-side application code.
■ Save and restore application state beyond the life of server requests.
■ Reuse and extend components through customization.
This chapter provides an overview of Java Server Faces technology. After explaining

 Java Server Faces application is and reviewing some of the primary benefits of
using Java Server Faces technology, this chapter describes the process of creating a
simple Java Server Faces application. This chapter also introduces the Java Server Faces
life cycle by describing the example Java Server Faces application progressing through
the life cycle stages.

What Is a Java Server Faces Application?
The functionality provided by a Java Server Faces application is similar to that of any
other Java web application. A typical Java Server Faces application includes the
following parts:
■ A set of web pages in which components are laid out
■ A set of tags to add components to the web page
■ A set of managed beans, which are lightweight container-managed objects
(POJOs). 

In a Java Server Faces application, managed beans serve as backing beans,
which define properties and functions for UI components on a page.
■ A web deployment descriptor (web.xml file)
■ Optionally, one or more application configuration resource files, such as a
faces-config.xml file, which can be used to define page navigation rules and
configure beans and other custom objects, such as custom components
■ Optionally, a set of custom objects, which can include custom components,
validiators, converters, or listeners, created by the application developer
■ Optionally, a set of custom tags for representing custom objects on the page
 

The web page, my facelet.x html, is built using Java Server Faces component tags.
Component tags are used to add components to the view (represented by my View in the
diagram), which is the server-side representation of the page. In addition to
components, the web page can also reference objects, such as the following:
■ Any event listeners, validiators, and converters that are registered on the
components
■ The Java Beans components that capture the data and process the
application-specific functionality of the components

JavaServer Faces Technology Benefits
One of the greatest advantages of JavaServer Faces technology is that it offers a clean
separation between behavior and presentation for web applications. A Java Server
Faces application can map HTTP requests to component-specific event handling and
manage components as state ful objects on the server. Java Server Faces technology
allows you to build web applications that implement the finer-grained separation of
behavior and presentation that is traditionally offered by client-side UI architectures.
The separation of logic from presentation also allows each member of a web
application development team to focus on a single piece of the development process
and provides a simple programming model to link the pieces. For example, page
authors with no programming expertise can use Java Server Faces technology tags in a
web page to link to server-side objects without writing any scripts.
Another important goal of Java Server Faces technology is to leverage familiar
component and web-tier concepts without limiting you to a particular scripting
technology or markup language. Java Server Faces technology APIs are layered directly
on top of the Servlet API.


This layering of APIs enables several important application use cases, such as using
different presentation technologies, creating your own custom components directly
from the component classes, and generating output for various client devices.
Face lets technology, available as part of Java Server Faces technology, is the preferred
presentation technology for building Java Server Faces technology-based web
applications. For more information on Face lets technology features, see Chapter 8,
"Introduction to Face lets".
Face lets technology offers several advantages.
■ Code can be reused and extended for components through the templating and
composite component features.
■ You can use annotations to automatically register the managed bean as a resource
available for Java Server Faces applications. In addition, implicit navigation rules
allow developers to quickly configure page navigation (see Navigation Model for
details). These features reduce the manual configuration process for applications.
■ Most important, Java Server Faces technology provides a rich architecture for
managing component state, processing component data, validating user input,
and handling events.
The web page, my face let.x html, is built using Java Server Faces component tags.
Component tags are used to add components to the view (represented by my View in the
diagram), which is the server-side representation of the page. In addition to
components, the web page can also reference objects, such as the following:
■ Any event listeners, validators, and converters that are registered on the
components
■ The Java Beans components that capture the data and process the
application-specific functionality of the components

Java Server Faces Technology Benefits


One of the greatest advantages of JavaServer Faces technology is that it offers a clean
separation between behavior and presentation for web applications. A JavaServer
Faces application can map HTTP requests to component-specific event handling and
manage components as stateful objects on the server. JavaServer Faces technology
allows you to build web applications that implement the finer-grained separation of
behavior and presentation that is traditionally offered by client-side UI architectures.
The separation of logic from presentation also allows each member of a web
application development team to focus on a single piece of the development process
and provides a simple programming model to link the pieces. For example, page
authors with no programming expertise can use JavaServer Faces technology tags in a
web page to link to server-side objects without writing any scripts.
Another important goal of JavaServer Faces technology is to leverage familiar
component and web-tier concepts without limiting you to a particular scripting
technology or markup language. JavaServer Faces technology APIs are layered directly
on top of the Servlet API.

This layering of APIs enables several important application use cases, such as using
different presentation technologies, creating your own custom components directly
from the component classes, and generating output for various client devices.
Facelets technology, available as part of JavaServer Faces technology, is the preferred
presentation technology for building JavaServer Faces technology-based web
applications. For more information on Facelets technology features

"Introduction to Face lets".
Face lets technology offers several advantages.
■ Code can be reused and extended for components through the templating and
composite component features.
■ You can use annotations to automatically register the managed bean as a resource
available for Java Server Faces applications. In addition, implicit navigation rules
allow developers to quickly configure page navigation (see Navigation Model for
details). These features reduce the manual configuration process for applications.
■ Most important, Java Server Faces technology provides a rich architecture for
managing component state, processing component data, validating user input,
and handling events.

                                          "News powered by"
                           



No comments:

Post a Comment

About Me

Popular Posts

Designed By Seo Blogger Templates