|
Putting a New Face on Web Interfaces
The JavaServer Faces technology takes the next step in separating presentation from business logic
by Peter Varhol
April 2003 Issue
Building user interfaces (UIs) with Java 2 Platform, Enterprise Edition (J2EE) has never been completely satisfactory. Today, most developers using JavaServer Pages (JSP) apply HTML user controls, which represent the lowest common denominator in what browsers can be expected to support. The result is that Web-based UIs have long been known as being less rich than their fat client counterparts.
That reputation may be about to change. The JavaServer Faces (JSF) technology offers the potential to provide developers with a rich set of user interface components for building better features and usability into J2EE applications. JSF was developed under the Java Community Process (JCP) as JSR-127, and at the time of this writing was available under the early access process.
The JavaServer Faces technology consists of two separate technologies. The first is a set of APIs for representing user interface components and managing their state, handling events and input validation, defining page navigation across the user interface, and supporting internationalization and accessibility. This part is visible to the end user. The second, and more interesting technology from the perspective of Web application developers, is a JSP custom tag library for expressing a JSF interface within a JSP page. This feature means that JSP developers can incorporate these user interface controls simply by adding a tag library.
There's more benefit to developers. JSF extends the model begun by JSP in separating presentation from logic. In this case, the model takes another step, by taking functionality associated with user actions off the page and onto the server.
One premise of JSF technology is that the HTML client is not good enough to render rich user interfaces. It's long been accepted that browser-based interfaces lacked both the feel and the range of features of a thick client. In proposing this technology, the JCP acknowledges this shortcoming and offers a solution that will appeal to those frustrated by current limitations.
The JavaServer Faces technology also represents an interesting user interface architecture. The key to JSF is that the user interface code runs on the server, responding to events that are generated on the client to make the user interface itself distributed. While this characteristic represents a reversal of traditional application design, a minute's reflection can reveal several advantages in this architecture. It works in the same way as your JSPs, for example, providing for consistency of implementation. Assuming a reliable and persistent network connection, there's no reason why it can't be just as fast as any other user interface.
Back to top
|