JSF, a Sun standard View Technology., solves the Rich UI problem in the following ways:
1. JSF separates the "Rich component" developers from UI developers.
The Rich component developers deal with all the javascript and make the components cross-browser compatible. They provide a custom tag library which allows UI developers to use the components.
2. JSF provides a templating technology called Facelets.
Facelets files are .xhtml files which look just like regular HTML files. UI developers can use the custom tags provided by the Rich component developers to put components in their pages.
At run time, Facelets renders the final HTML page which is seen on the browser, replacing the custom tags with appropriate HTML tags and java scripts (as specified by the Rich component developers).
3. JSF provides a Bean container, so that any Java class on the server can be declared to be a JSF bean. And a rich component can call methods on the JSF Bean.
Internally, JSF generates all the necessary AJAX calls to make the communication between browser and server possible.
4. JSF allows page navigation to be declared in an XML file (faces-config.xml)
At run time, JSF will read the navigation file and display the appropriate pages to the user.
5. JSF maintains the state of the Beans and also of the View.
No effort is needed on part of the application developer.
No comments:
Post a Comment