JSF
What is JSF?
JavaServer Faces (JSF) is a MVC web framework that simplifies the construction of User Interfaces (UI) for server-based applications using reusable UI components in a page. JSF provides a facility to connect UI widgets with data sources and to server-side event handlers. The JSF specification defines a set of standard UI components and provides an Application Programming Interface (API) for developing components. JSF enables the reuse and extension of the existing standard UI components.
Benefits
JSF reduces the effort in creating and maintaining applications, which will run on a Java application server and will render application UI on to a target client. JSF facilitates Web application development by −
- Providing reusable UI components
- Making easy data transfer between UI components
- Managing UI state across multiple server requests
- Enabling implementation of custom components
- Wiring client-side event to server-side application code
JSF UI Component Model
JSF provides the developers with the capability to create Web application from collections of UI components that can render themselves in different ways for multiple client types (for example — HTML browser, wireless, or WAP device).
JSF provides −
- Core library
- A set of base UI components — standard HTML input elements
- Extension of the base UI components to create additional UI component libraries or to extend existing components
- Multiple rendering capabilities that enable JSF UI components to render themselves differently depending on the client types.
JSF technology is a framework for developing, building server-side User Interface Components and using them in a web application. JSF technology is based on the Model View Controller (MVC) architecture for separating logic from presentation.
What is MVC Design Pattern?
Get Emulation Software Technologies Pvt. Ltd.’s stories in your inbox
Join Medium for free to get updates from this writer.
MVC design pattern designs an application using three separate modules −
S.No Module & Description 1 Model
Carries Data and login
2 View
Shows User Interface
3 Controller
Handles processing of an application.
The purpose of MVC design pattern is to separate model and presentation enabling developers to focus on their core skills and collaborate more clearly.
Web designers have to concentrate only on view layer rather than model and controller layer. Developers can change the code for model and typically need not change view layer. Controllers are used to process user actions. In this process, layer model and views may be changed.
JSF Architecture
JSF application is similar to any other Java technology-based web application; it runs in a Java servlet container, and contains −
- JavaBeans components as models containing application-specific functionality and data
- A custom tag library for representing event handlers and validators
- A custom tag library for rendering UI components
- UI components represented as stateful objects on the server
- Server-side helper classes
- Validators, event handlers, and navigation handlers
- Application configuration resource file for configuring application resources
There are controllers which can be used to perform user actions. UI can be created by web page authors and the business logic can be utilized by managed beans.
JSF provides several mechanisms for rendering an individual component. It is upto the web page designer to pick the desired representation, and the application developer doesn’t need to know which mechanism was used to render a JSF UI component.









