| Java Server Faces - Java Web GUI III | ||||
|
||||
Feature: Java Server Faces is a third
kick (see previous here) at the Web GUI cat The Web GUI interface has and continues to presents a number of problems to system architects. The problems first involve how much smarts should be deployed on the client GUI, often a desktop PC (but no longer automatically so) and how much should be implemented on the server. The rise of the browser based GUI interface has only complicated the problem because users are demanding more GUI conveniences such as tables, treeviews, video windows, and other GUI goodies while still demanding fast response time and even the convenience of offline operation.But the question remains which side of the fence - client or server is best suited to delivering these capabilities. Also users are looking for more of their devices such as PDAs, mobile phones, and other WiFi connected devices to be able to talk and do business. But at the same time IT developers and system operators are confronted with enormous security, reliability, and sheer "keeping up with the changes" problems. In effect, there are serious Presentation Layer Problems in designing and architecting systems, just as vexing as the messaging/middleware and long transaction/data integrity problems of the other two major layers in n-tier processing. Here is a summary of the Presentation
Layer Problems: JSF - Java Server Faces Java Server Faces - JSF can really be thought of as the third kick at the Java Web GUI cat. The first kick was Java Servlets which had a certain elegance and simplicity of design that is still attractive to some Web developers using Java. But the Achilles heal of Java Servlets was the need to imbed scores if not hundreds println(" ... "); statements with HTML and/or JavaScript code without creating a syntactic nightmare of which double quote belonged to which string or language. Needless to say it was not pretty - and a hopeless task for the Java-less but HTML savvy web designers.In addition, developers were confined to the HTML FORM elements and associated HTML range of devices. Hence the second kick at the Java Web GUI cat - Java Server Pages. JSPs went the opposite way - embedding special JSP tags into otherwise HTML driven pages. It is a neat division of labor - HTML/CSS/JavaScript are responsible for layout, page formatting, and static content composition; JSPs are responsible for maintaining security, identity, state, and any dynamic data connections required. Both side may engage in business logic, validations, and analytic calculations or processing. But despite these advances, JSP did not attack the problems of multiplier devices, richer GUI widgets, response time and offline operation. So on the third attempt, first Struts and then its successor, JSF-Java Server Faces were both built on top of JSP technology. Struts was designed to deal with organizing the creation of complex applications with multiple work/page flows dependent on business rules and diverse and unpredictable inputs and outcomes (different Forwards in Struts parlance)at each stage. JSF was built to provide a richer GUI experience including new user designed GUI widgets which could be more responsive to events and exceptions in processing while also working on a wider range of devices (think PDAs, tablets, and even mobile phones) Java Server Faces are starting to deliver on these promises as more of the
major Java IDE This generation of quality components in a relatively short period of time (JSF technology is about 2 years old) is crucial because it shows that JSF has pull power in the third party arenas. As well the signs are good on the development side as such major players as Sun through NetBeans extensions, Eclipse through plugins and Oracle through JDeveloper extensions are promoting 3rd party JSF components. And in fact the most interesting story is how good the JSF implementations are for some major Java IDEs and specifically how they are fostering interoperability not just in JSF but among Java application servers and major databases. The remainder of this overview will be devoted to examining those IDEs and the different approaches they bring to JSF Development. Java JSF IDEs There is an interesting approach being taken by a number of vendors towards JSF. They are providing startup wizards , enhanced database connectivity and JSP Web Page workflows diagrams. But the emphasis is as much on coding aids as wizards and templates. Exadel Studio Pro But all of these shortcuts are oriented along with the smart JSP editor with code completion to getting the right coding in place. The emphasis is still on developers who have good JSP, XML, and JSF editing skills. Developers are expected to know their JSF and JSP stuff and be able to work to code completion. But Exadel Studio Pro certainly gives users a great start. Finally, not only does Exadel support almost any JDBC compliant database
but also a broad range of applications servers.
For example, Exadel provides full support for controlling (start/stop/restart/debug)
of Tomcat, JBoss, JRun and J2EE 1.4 Servers. As well its has the deployment
smarts for upto a dozen additional servers. Exadel, like Nitrox just below
is still very much a coders development tool. Some developers pooh-pooh this type of visual interface - calling it a crutch.
This developers says "the crutch" sure seems to speed up development work.
For example, Nitrox is constantly aware of all the pages and associated fields,
methods, and variables in an application. Make a change to one variable name
and Nitrox alerts users in the the Problem viewer where all the other Java,
JSP, and XML instances of the variable are flagged. The Visual Designers:Oracle JDeveloper and Sun's Java Studio Creator There is a second set of Java IDE tools for J2EE and JSF development that
take a sort of visual MDA-Model Driven Architecture approach to JSF development.
The best two exponents are Oracle's JDeveloper and Sun's Java Studio Creator. What makes the JDeveloper toolset so compelling is that all the different
viewpoints are a)constantly synch-ed together similar to Nitrox dual view
(but not as blazingly fast as Nitrox) and b) Oracle has created personalities
(similar to Eclipses perspectives) for managing the various editors and tools.
So yes just like Visual Studio 2005 or JBuilder 2005, JDeveloper has all
the tools to manage development from design through visual layout and testing
to debugging and deployment. But as well its adept synching and customizable
personalities help to manage the complexity of each stage along the way. Sun's
Java Studio Creator has been in the unenviable position of trying to
make Java Development as easy as Visual Basic once was. Of course that is
a task that even Microsoft has had dubious results with Visual Basic.NET.
About 8 months ago we examined JSC-Java
Studio Creator for ADTMag and found it very promising. We update that
look see with the new update 7 version of Java Studio Creator as shown in
the screenshot below. The two major drawbacks to JSC is that it is not as versatile as other tools. JSC only supports JSF framework in comparison to say Borland JBuilder or Oracle JDeveloper which support Struts as well as JSF plus AWT and Swing for applet and/or application components of a system. the second drawback is the JSC only supports Sun Application Server 8 in development and some pretty rough deployment "aids" to other servers like Tomcat, JBoss, WebSphere, Weblogic, etc. Given that the new NetBeans 4.1 adds support for several popular servers and has had AWT, Swing and Struts support for sometime - there is hope JSC will incorporate these capabilities as it is built on a NetBeans Foundation. And that foundation, is very smooth and concise unlike the more unwieldy Eclipse framework which is sprouting more redundant and overlapping viewers, plugins, properties, and perspectives than one can possibly hope to keep up with. Shades of Visual Studio.NET's ever-sprouting designers, wizards, and popup dialogs. Summary Java Server Faces through Java IDE builders and component creators are delivering on the first 3 Web GUI demand - a much broader range of operating environ, much better components, and inching towards delivery to different devices as more robust JSF Render Kits get delivered. These are improvements over Struts. As well, Points 6) and 7) easier deployments and administration are also marginally improved with JSF - as better deployment and server management functions are supplied in conjunction with the application server vendors. But points 4) offline operation and 5)fewer roundtrips are barely touched on with JSF - some argue the new JSF event handling model makes offline ops and network response improvement even harder to achieve. Now these trade-offs are important because competing GUI technologies such as Flash from Macromedia and Laszlo and the surge in interest in AJAX - Asynchronous JavaScript And XML do address the issues of 4)offline operation and/or 5)improved network response time. Currently both Flash and AJAX technologies raise some ease of development, fewer components, and some deployment problems. And they also open up some new security problems that Java based technologies have already mastered. So it is good to see the wealth of JSF tools and components being delivered. But there remain problems which will probably see hybrid solutions which meld rich client techniques like Flash and AJAX with server side presentation layers like JSF more closely. Resources: Finally my thanks to all theOpenSourcery.com readers and commentators at the Java symposium for their recommendations for tools to use with JSF. If you have a favorite tool please send an email here to have your tool reviewed. Top of Page Home Tutorials Java GUI |