Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Java Server Faces (hereafter JSF) is an event based development framework in Java EE5 arena. It is a framework for building user interfaces for Web application.
JavaServer Faces uses the existing user interface and Web tier mechanisms but it does not tie up the applications to a particular mark-up language, protocol and client device. It encapsulates various UI component functionality enabling it render data to various client devices by developing required custom tags. JavaServer Faces technology provides a custom renderer and a JSP custom tag library for rendering to an HTML client, allowing developers of Java EE applications to use JavaServer Faces technology in their applications.

JSF follows a MVC architecture, Web application following MVC architecture are best developed using JSF.
Let us briefly understand what is a MVC architecture. Any Enterprise Application has a Business component, Presentation component and a Controller component. Usually small applications will have all the components tightly coupled with each other. Any change to one component will have an effect on others. As the size of the application increases it becomes more difficult and complex to debug and modify the application. So as to solve this problem we need to improve the architectural design of the application.

...

  • Helps to reduce duplication in the code
  • Maintenance of the existing code becomes easier
  • Provides a central place to control all the user views- Controller
  • Any new user view can be added and later wired to the controller
  • Debugging the application becomes quite easier
  • Changes to the Model have a minimal effect on View and Controller

Coming back to JSF now, JavaServer Faces technology clearly separates presentation logic from the application logic. Several development roles can be created and designated during the application development state. The JSF technology is developed through Java Community Process under JSR-127.

JSF has the following as the major component

...

This completes what gives the basic idea on architectural design of Java Server Faces and the various components available with Java Server Faces.

JavaServer Faces technology provides

  • APIs for representing user interface components and managing their state, handling events triggered on them, validating inputs entered by user, defining page navigation, supporting internationalization and accessibility.
  • A custom tag library for developing JSF interface within a JSP.

Underlining samples will describe how MVC architecture and various components are being used in application development. Apache geronimo v2.1 uses Apache MyFaces v1.2.2 for JSF implementation.