JSF web applications life cycle takes its start when a request is made by a user. When a page is submitted various other tasks would be performed, for example data validation given in the components, conversion of data etc. Therefore various steps are present which are followed by an application which is known to be the life cycle. JSF Life Cycle 1. Restore view phase:
When a JSF page is requested by a user by clicking
When integration of the MVC designed pattern was done to create JSF so that greatly maintainable applications could be designed. For understanding of these facts, it is required to have the understanding that what is MVC pattern or how it assists in application designing so very well and how one could be making an application easily maintainable.
An application design is split into 3 parts, by the help of MVC design pattern. Model : Model handles logic and data.
Components present in JSF are elements, for example buttons, table, text box etc. which could be used for creation of UI of the applications of JSF. Such objects manage the user interaction. One may be creating:
1. Simple components, for example button, text box and
2. Compound components, like data grid, table etc.
Various components that are present in a component is referred as a compound component. Developers are assisted by the components to make UIs when
JSF is a framework that is considered to be very rich featured in Java technologies. Standard features that are provided by JSF which would be making it a standard and powerful thing among other technologies to develop the web applications. Few features are here so that this statement could be justified.
1. JSF is considered to be a standardized web user interface framework, for Java.
2. Developed at the Servlet API top.
3. JSF is basically a component framework
JSF is basically a new kind of standard framework that has been developed via JCP which makes it an easy task to make user interfaces, for web applications. This is usually done when reusable components which are present in a page are assembled. One might be thinking a JSF framework to be a toolbox which has ready-to-use components so that such components might be used multiple times for adding and reusing them. Therefore, JSF applications are considered to be event driven. Typically, you can embed
First it shall be understood that what the reasons which initiate the JSF projects are. Why JSF has been considered to be very hot today? Reasons are there to develop the new frameworks rather than other many present already like Struts, JSP and Servlets. If a complexed web application has been developed in JSP, then this shall be kept in mind that certain complexities would be related.List of few problems related with certain technologies are given as following: Tedious and repetitive
Following are the main disadvantages of JSF framework.
When retrieving data from database and rendering it using JSF table component, it has performance issues.
Managed bean and phase listener has no strong coupling.
Error messages that are displayed by default are not good.
It is not scalable. Session object is used to store the component state.
The JSF contains the following six phases as shown in figure as well.
Restore View Phase: It is used to retrieves the component tree.
Render Response Phase: When page is displayed first time and it has no query data, this phase is called.
Apply Request Values Phase: Object values are checked and applied in this phase.
Process Validations Phase: All the value validators are applied in this phase.
Update Model Phase: In this phase local values are updated
Folowing points explain the key differences between these 2 frameworks.
Struts framework is matured and evolved over the years.
JSF is immature as compare to Struts.
Struts is based on a controller which uses Front Controller design pattern. Also it has only one event handler for a HTTP request.
JSF is based on Page Controller design pattern and front controller Servlet handles all requests.
Struts does not support RAD.
Recently, Java Server Faces has gained lot of popularity for building web applications in java. Following are the core features of java server faces.
It supports rapid application development with help of its core components like buttons, text fields, tree, tables etc. Programmer can build their applications using these components.
It has a support for JSP tags to access its interface components as explained in above step. Also it supports custom components.