JSF - Architecture
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?
MVC design pattern designs an application using three separate modules −
|S.No||Module & Description|
Carries Data and login
Shows User Interface
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 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.