Most Read Latest News Blog Resources

JavaServer Faces Is Here




April 1, 2004 — 
It took more than two years, but JavaServer Faces (JSF), aka JSR 127, is finally available. In theory, JSF will help new developers build JavaServer-based Web applications quickly by assembling reusable user interface (UI) components in a page, connecting components to an application data source, and wiring client-generated events to server-side event handlers. Essentially, JSF provides a single application programming interface (API) set for creating interoperable components for application servers and component libraries.

Specifically, that means JSR 127 comes with APIs for UI components and managing their state, handling events and input validation, and easier and more flexible page navigation. It also includes a JavaServer Pages (JSP) custom tag library for expressing a JSF interface inside a JSP page.

Like Swing, JSF provides the usual UI widgets, such as buttons, checkboxes, etc; a model for creating custom widgets; and ways to handle client-generated events on the server. Don't mistake this, though, for just another way to create Web-based user interfaces. It's more than that. JSF's two strongest points are that it enables your developers to create Web applications that aren't specific to a particular rendering kit, and it lets you easily connect a J2EE app server to the user interface.

Without JSF, when you build an interface, if you're using Java Standard Tag Library (JSTL), JSP Expression Language, or even if you just use Struts and assume that HTML is good enough, you still end up with a UI that works well only with a particular browser. That might be good enough in some corporate environments, but wouldn't it be better to have the flexibility to build an application that you could write once and run on any interface from a smartphone to a Pocket PC to a workstation? Hmmm. Write once, run anywhere. Where have I heard that before?

The ability to easily link a J2EE application and its associated database management system (DBMS) is not a small deal. There have always been many ways for J2EE to work with JSP or other ways to create active Web pages, but that was part of the problem. And, I might add, it was one area where .NET clearly has outshone Java. There was no standard way to present J2EE-based applications to users…until now.

Of course, frameworks like Ants and Struts provided some of this functionality, but JSF provides a greater range of client-side features. You also don't have to give up those frameworks. 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. If you're working with Lotus Notes or IBM's WebSphere, I can guarantee you that you'll be working with JSF. Indeed, 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 its official blessing in early March.

IBM isn't the only company that wants you to use JSF. Sun's newest Java development tool, Java Studio Creator, now in its second beta, includes it. There, JSF is a perfect technology for Studio Creator's avowed goal of simplifying the construction of DBMS-based Web applications.

And simplification is exactly what JSF brings your programmers. We've come a long way from the days of Servlets, Model 1 and Model 2, and JSF is the next evolutionary step.

Of course, you may have already invested a lot of time and effort into creating the perfect blend of JSP Model 2 application. The rise of JSF doesn't mean you have to dump your code in the junk pile. All it means is that you should strongly consider using it for your future projects.

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.

Since JSF makes J2EE-based Web applications much easier to build, you'll save time on your next project by simply having to spend fewer man-hours on it. In addition, since you can turn over more of the UI work to less-experienced programmers, you'll save even more of your programming budget than a simple look at the development hours would suggest.

Of course, it's still the early days for JSF, but with Apache, IBM and Sun all pushing it, and the simple fact that it really does make a developer's life easier, I'm sure it won't be long before all your favorite IDEs and tools support it. But why wait? You can start working with it today. You'll be glad you did.


Share this link: http://www.sdtimes.com/link/27781
 

Add comment


Name*
Email*  
Country     


  • Comment
  • Preview
Loading



 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 
Download Current Issue
ISSUE 3/15/2010 PDF

Need Back Issues?
DOWNLOAD HERE

Receive the print Edition?


 
blogs tab
Google Code turns 5
Google Code Turns 5, and adds a Paxos Algorithm to make the system more stable and reliable.
03/17/2010 11:16 AM EST

Test your Visual Studio 2010 know-how
Microsoft is offering free beta certification exams for Visual Studio 2010.
03/17/2010 11:08 AM EST

Microsoft lifts the hood on IE9
Microsoft is previewing IE9.
03/16/2010 01:10 PM EST

 

Events calendar tab
3/22/2010 to 3/25/2010
Santa Clara, Calif.
The Eclipse Foundation

4/12/2010 to 4/14/2010
Las Vegas
Penton Media

4/12/2010 to 4/15/2010
Santa Clara, Calif.
O'Reilly Media

4/19/2010
New York City
Flagg Management

4/25/2010 to 4/28/2010
Overland Park, Kans.
IIUG