Java
  Home arrow Java arrow Introducing Java Server Faces (JSF)
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Introducing Java Server Faces (JSF)
By: A.P.Rajshekhar
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2006-10-17

    Table of Contents:
  • Introducing Java Server Faces (JSF)
  • JSF: Terminology Continued
  • JSF: Steps for Implementation
  • JSF in the Real World

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Introducing Java Server Faces (JSF)


    (Page 1 of 4 )

    This article will introduce you to Java Server Faces, including the terminology, how to set it up, and using it in the real world.

    The event driven paradigm has been considered the forte of desktop applications for a long time. Though web applications have HTML to present the user with buttons and other familiar GUI elements, the developer has to work with the request-response paradigm. However, server-side development is slowly shifting towards the event driven paradigm. Frameworks are accelerating this shift by abstracting out the difficulties of constructing an event-handling layer over a request-response layer.

    In the context of J2EE or JEE, the framework that is providing an event-based development platform is Java Server Faces, or JSF as it is popularly known. In this discussion I will be focusing on the basics of JSF. The first and second sections will cover the terminology associated with JSF. In the third section, I will enumerate the steps required for setting up the arena for JSF. In the last section I will implement a real world solution using JSF. That outlines the agenda for this discussion. 

    JSF: Understanding the Terminology

    Whenever a new framework comes into being, it brings a plethora of new terms and vocabulary with it. JSF doesn't contradict this generalization. However, in the case of JSF, its terminology is also its components. In other words, one cannot develop using JSF without understanding the terms, because they are the pieces of the puzzle called JSF. The following are the main components that make JSF:

    1. UI Components
    2. Renderer
    3. Validator
    4. Backing Beans
    5. Converter
    6. Events and Listeners
    7. Messages
    8. Navigation

    If you observe carefully, you will see that the first, fourth and sixth components are present in one form or another while working with any event driven toolkit, but the second, third and fifth are additions to JSF. The seventh and eighth are the demands of any web framework. Here are the details.

    UI Components

    UI Components are also known as controls or simply components. A component is a stateful object. It is built atop JavaBeans. In other words, a UI Component has properties, events and methods. The obvious question here is, what is the difference between a JSF UI Component and a Swing component? The answer is that JSF UI Components have been chosen with server side constraints in mind, and these components live on server-side not on the client side.

    The other important thing to keep in mind is that web applications can never be built using components. The components themselves are not shown on the client-side, but they output the HTML which is then interpreted by the browser and shown to the user as GUI elements. In other words, the UI Components are rendered for the browser. A UI Component can be represented in many ways. How it is shown is decided by Renderer.

    Renderer

    A component cannot render itself. It is the responsibility of the Renderer to display the component and translate the user input values into the values understandable by the component. A single Renderer can work with multiple components, and a component can work with many Renderers. In short, UI Components and Renderers have a many-to-many relationship. A Renderer can be thought of as a translator between the client and the server. The main thing to keep in mind about Renderers is that custom renderers can be hooked to existing UI Components.

    More Java Articles
    More By A.P.Rajshekhar


       · JSF has brought event driven paradigm to the web application development. In this...
       · Hi,On the last page you have mentioned struts-config, I think it should be...
     

    JAVA ARTICLES

    - Deploying Multiple Java Applets as One
    - Deploying Java Applets
    - Understanding Deployment Frameworks
    - Database Programming in Java Using JDBC
    - Extension Interfaces and SAX
    - Entities, Handlers and SAX
    - Advanced SAX
    - Conversions and Java Print Streams
    - Formatters and Java Print Streams
    - Java Print Streams
    - Wildcards, Arrays, and Generics in Java
    - Wildcards and Generic Methods in Java
    - Finishing the Project: Java Web Development ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT