JavaServer Faces (JSF)

JavaServer Faces is a set of web-based GUI controls and its associated handlers. JSF provides many prebuilt HTML-oriented GUI controls, along with code to handle their events. JSF can be used to generate graphics in formats other than HTML, using protocols other than HTTP. JSF is a well-established standard for web-development frameworks in Java. The standard is based on the MVC paradigm much like its counterpart, STRUTS. Some people also call it a better STRUTS but that leaves much room for debate. It provides a set of APIs and associated custom tags to create HTML forms that have complex interfaces. Validation is rather easy in JSF. It has builtin capabilities for checking that form values are in the required format and for converting from strings to various other data types. If values are missing or in an improper format, the form can be automatically redisplayed with error messages and with the previously entered values maintained much like the binding capabilities of Spring 2.5.

One of the other things that JSF supports is the ability to configure java files centrally i.e it has a configuration xml file where all the properties are set along with dependence injections. If a change needs to be made in many files then a small change in the xml file can be done to achieve that. Rather then hard-coding information into Java programs, many JSF values are represented in that xml or property files. This loose coupling means that many changes can be made without modifying or recompiling Java code, and that wholesale changes can be made by editing a single file. This approach also lets Java and Web developers focus on their specific tasks without needing to know about the overall system layout.

This is just a small overview of JSF. It has many other components that are very complex yet helps solve issues that are normally done by Spring or Struts. It has many advantages in comparison to Struts and Spring as well as some disadvantages.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s