15 years of excellence
Get a QuoteReady to get started on your project?

Building user interface for web is always been discussed, advised, argued and even warned among the web developer community and user interface researchers. There are sites exclusively discussing User Interfaces for web sites and web based applications. User Interfaces (UI) design using leads to innovative thinking, and at the same time, to criticisms. An UI is needed to give the first impression, and an UI is is the foundation of success for web applications. Developers of Java has now got a new framework called Java server Faces(JSF) which can minimize their hurdles in excellent UI designing, and improve the applications overall values. Let us have a brief on JSF, which can guide you to start your own JSF writing.

Why Java Server Faces(JSF)?

Web page authors, Application developers, Component writers, Tools vendors are always needed good interface writing skills. In earlier days, there was a hard time for Java Developers to care about the Interfaces and Design templates. There was no much flexibility or design time tools that can support their needs to create the Interfaces, which the end-users like. Java developers need to take much effort to give good user interfaces for the applications they write.

Java developers has existing frameworks, Servlets and Java Server Pages (JSP) which gives the ability to build HTML-based Web applications using Java, but the servlet APIs and JSPs were foundational technologies, they left a lot to be done before a Web application could be considered complete. So mostly Java Web developers had to implement their own frameworks, including page navigation and reusable user interface (UI) components for the Web. There was no standard way to do this implementation easily and without a standard there was no advanced development tool support that offered a productive and visual way to develop Java-based Web applications.

UI designers still have to have much programming knowledge and thanks to Java Server Faces (JSF) which helps us to make the UI development life a lot easier.

The good things about JSF framework:

  • According to SUN, JSF technology offers a clean separation between logic and presentation, enabling a wide range of users -- from web-page designers to component developers-- to take advantage of Java Server technology, resulting in a division of labor and a shorter development cycle.
  • A user-interface created with JSF framework handles all the complexities of user-interface management, including input validation, component-state management, page navigation, and event handling.
  • JSF is being developed through the Java Community Process, under JSR-127. Several prominent, respected tools vendors are contributing members of the JSR-127 expert group and are committed to supporting Java Server Faces technology in their tools.
  • JSF technology is designed to be flexible. By defining only component functionality in extensible UI component classes. For example Component developers can use JSF architecture write component classes and can generate their own component tag libraries targeted for each specific clients.

Solutions for practical UI issues:

In any application development project, interface is a frequent updated part, so we try to ease the changes in the interface as much as possible. In a development firm the members of the team have significantly different skill sets - server-side programmers, HTML coders, graphic designers, etc. for whom they want their work to be as independent as possible. This leads to a model-view-controller (MVC) design to separate the roles.

In many organizations, the development of a web application can work in this way: The designer creates a prototype, the HTML coder does everything in HTML, and the server-side programmer achieves the needed functionality in a server side programming language(JSP, PHP, or ASP etc.,). But this approach doesn't work mostly, in a No Problem state. The designer, when creating the prototype, is limited only by his or her imagination, inadvertently causing problems for the other participants, often forcing them to start from scratch when developing a new application.

Some one may say that such problems can be corrected using the existing frameworks and by using custom tags or XML/XSL transformations. But there are still problems persist with code reuse. Also for the web developer to know the button has been pressed, he has to analyze the HTTP request and try to determine what has happened. This is not ideal. The programmer shouldn't have to work so hard to figure out if a button, image, or hyperlink was clicked, or how these pieces were implemented in HTML. Ideally, the developer just wants to know that an event occurred. In other words, the developer should be able to see the web interface in terms of familiar high-level concepts.

The JSF Model

JSF has the reusable server components for creating the Graphical User Interfaces. In JSF architecture, all components should inherit from javax.faces.component.UIComponent . Any page or screen of the application will consist of a set of such components. A set of hierarchically ordered components is called the JSF Tree or the View. With this tree of components we can understand the structure of the onscreen page. Each element of a tree is UIComponent , with some components being composites and thus having child components.

In JSF there is a set of standard components. According to Java specification request-127, The developer can create new components based on existing components (for example, by inheriting from UIOutput, which is a subset of UIComponent), or by a completely new subclass of UIComponent. To make creating components easier, it's possible to inherit from UIComponentBase, which contains default implementations for the methods in UIComponent.

JSF applications are straightforward and easy to implement. A JSF application is essentially a standard J2EE application with a set of required components:

  • Faces servlet configured in web.xml - The faces servlet acts as a Model-View-Controller for all requests to Web application elements, which controls the entire application traffic. Struts developers will find this component almost identical to the Struts controller servlet.
  • JSF configuration file - This is faces-config.xml, is also similar to the Struts configuration file by serving as a master configuration file for the application's components and navigation model.
  • JAR files - Every JSF application will need certain JAR files in the application's WEB-INF/lib directory. They are jsf-api.jar, jsf-ri.jar, jstl.jar, standard.jar, commons-beanutils.jar, commons-digester.jar, commons-collections.jar, and commons-logging.jar

JSF application UIs can also be constructed entirely from well-formed XML documents rather than JSP pages. For deployment, JSF applications do not require a specially configured run-time environment, but can be deployed standalone to any standard J2EE container such as Tomcat.

Where to start?

Frameworks like Ants and Struts provided some of this functionality, but JSF provides a greater range of client-side features. The open-source Apache Jakarta Struts project already has a JSF library (jakarta.apache.org/struts/proposals/struts-faces.html ) to make life easier for programmers who use Struts.

JSF promises to be not just another Java standard, So Java developer will find JSF as an easy way to start, no learning of a whole new concept, but just the prerequisites. Lotus Notes or IBM's WebSphere developers will be working with JSF as a beta JSF implementation was already shipping in IBM's WebSphere Studio 5.1.1 a few weeks before the Java Community Process gave JSF.

Also Sun's newest Java development tool, Java Studio Creator, now in its second beta, includes it. Excising J2EE developers can straight away start using JSF framework as it has been shipped with the newer versions of JDK. To use JSF, you'll need Java Development Kit (JDK) 1.3.1 or higher and Java Web Services Development Pack 1.3. It will run on Solaris 8 or higher, Windows XP, Windows 2000 or Red Hat Linux.




Please fill in the fields below and click the "Send" button.
We will e-mail a link of this article.

Your Name
From Email Address
To Email Address
Please note: We will not spam or share your Email Address
Quick Enquiry

Related Readings

Verified Company

Inc.com Verified

Case Studies

Website details: A blog site with social networking features and user..

Challenge: This is a social community website, with..

More Case studies..

Recent Blog

What our clients Think


  • todd
  • Store Point
  • Open Solutions


  • WordPress
  • Joomla
  • Prestashop
  • CodeIgniter
  • Laravel
  • Responsive Web Design
  • Mobile Apps
  • HTML5