YOUR FEEDBACK
The Cloud Wars - Is Guitar Hero a Cloud?
Roland Judas wrote: I am following the cloud discussions for some months n...


2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP THREE LINKS YOU MUST CLICK ON


JSF: A Wish List
Great but not perfect

Digg This!

Page 2 of 3   « previous page   next page »

On the controller front, JSF offers a simple way to define page flows and state management. And the event-based programming of Web UIs helped the further adoption of JSF by developers familiar with the concept from their work with tools such as Visual Basic, PowerBuilder, and Oracle Forms. Developers who pick up JSF quickly realize that it does a great job of clearly separating the View and Controller layers — especially when developers use the XML-based JSPX format.

Another key advantage of JSF compared to other Java frameworks is the extensive tooling support offered by all the major players in the Java IDE space. Most of the IDEs offer visual page layout editors, property inspectors, and component palettes, in addition to page flow diagrams for the controller part.

The result of these benefits is a development experience that is much more productive than the old JSP way — even when you take into account the popular Struts/JSP combination. However, as good as it is right now, there's always room for improvement. So here's a wish list for the future of JSF.

Standardize AJAX Integration into JSF
One of the key benefits of JSF is its component-based approach to UI development. Instead of spending time writing markup languages, developers just pick components and arrange them on a page to construct user interfaces. This becomes an even bigger benefit when you bring AJAX into the picture. Component sets from Oracle, Backbase, ICEFaces, and others are already offering built-in AJAX functionality, which means that developers don't have to worry about JavaScript, DOM manipulation, XMLHttpRequest coding, or issues with their application being portable across browsers. By relying on the AJAX behavior that's built into the components, developers can speed up AJAX-based application development considerably.

However, one problem starts to rear its ugly head once you try to use AJAX-based components from different vendors in the same application. Integration between "regular" JSF components usually works out of the box with basic components, and you can mix and match component sets, but with AJAX-enabled JSF components, the situation is different.

Since the JSF specification doesn't include a definition of how AJAX should be incorporated into the JSF lifecycle, each vendor/framework has its own approach to handling AJAX events, usually involving extending the JSF lifecycle. The result is that developers end up with one set of components that collides with the architecture of another set because they have different lifecycles. This must be addressed in the next release of JSF.

While it's likely that the back-end JSF lifecycle aspect of AJAX integration can be standardized, standardizing the DOM manipulation or client side might prove to be a bit more challenging. Still I think that it's also an area worth the attention of the JSF community to prevent the accidental overwriting of client-side events by components from various sources.

Simplify JSF Component Construction
Most JSF component sets offer basic functionality that ranges from simple input components to more complex components such as shuttles and trees. But in many cases users want to define higher-level components that include subcomponents with specific functionality and behavior. For example, an address component would have several input components, a couple of select lists for state and country, and additional AJAX functionality that defines the dependency between country and state. The address component could then be packaged and used in multiple pages and applications.

I'd like to see JSF include an easy, standard way to define aggregated components so they could be reused, not just in a specific project, but by the members of the JSF community. One possible approach to simplifying aggregated component constructions is found in Oracle's ADF Faces Rich Client framework. You can define a component out of other components, define parameters that will be passed to the component, and define facets in the composite component's layout that let consumers of the component change its behavior at runtime. You can see an example in this demo, http://tinyurl.com/29smsu.

Add More States
JSF uses POJO-based managed beans to maintain values across pages in an application. These managed beans have scopes that can be defined as none, request, session, and application. The JSF engine automatically saves the information for the requested duration, making state management easy.

But developers need at least one additional scope in many applications - a task scope, which lies between the request and session scopes. Data in the task scope would last for the duration of a specific task, which might span several pages — but not throughout the full session. This is such a common requirement that implementations of such a scope have appeared in many of the JSF-based frameworks; for example, Shale's dialog scope, SEAM's conversation scope, and ADF Faces's process scope. Since this is such a common requirement, I fully expect to see this scope included in the next JSF iteration.

Developers might also benefit from a view scope, which would be active while a specific JSF page is being used. The need for this scope is likely to grow because AJAX components enable a new type of user interaction model — the single page model. In this model, users complete multi-step tasks by interacting with a single Web page instead of switching between different pages for each step. It's easy to see how this new interaction model would make the view scope an important addition to JSF, simplifying inter-component communication inside a page.

Introduce a New Component in the JSF Flow
JSF provides a controller layer that takes care of navigation rules between pages in an application and handles controller logic. Additional controller logic can be written in POJO classes that you define as "managed beans". This structure provides a very clear separation between view logic (located in the actual JSF pages) and the controller logic, which is in a separate physical file.

However, the JSF controller doesn't provide a very good way to represent or invoke logic as part of the flow between pages. Usually, developers invoke logic as part of the code behind a JSF component as part of a backing bean. For example, suppose that between the navigation from page A to page B you need to manipulate some data. Most developers will just write this code in the backing bean for the button that executes the navigation from A to B. This of course is not a great idea since it ties the logic to a specific button on a specific page. Although this can be resolved to some degree by refactoring the code into a separate managed bean, only few developers actually bother to do this.



Page 2 of 3   « previous page   next page »

About Shay Shmeltzer
A group manager for Oracle JDeveloper, Shay Shmeltzer has worked with Java specializing in Oracle JDeveloper and the Oracle ADF Framework, since 1999. Since 1993, he has applied his expertise at Oracle in the realm of development, consulting, sales, marketing and product management. Shay is a frequent speaker in events and workshops. His blog is at http://blogs.oracle.com/shay.

shay shmeltzer wrote: Ian - indeed JBoss's Seam and Oracle ADF are probably the two most advanced JSF based framework and I would encourage anyone who is about to embark on a JSF project to have a serious look into both.
read & respond »
Ian Darwin wrote: Most of the things you ask for are coming in the WebBeans JSR (299) and, are in fact available now from JBoss Seam.
read & respond »
LATEST JAVA STORIES & POSTS
Saving Your Investment: Transforming J2EE applications into Web 2.0 using GWT
The pressure is on to keep pace with Web 2.0 entrants into the marketplace. Rewriting is expensive; adding AJAX widgets results in a complex, unmaintainable application. Both require you to hire scarce JavaScript developers. Google Web Toolkit -- the SDK that allows you to write
WSRP Really Works! - Part 2
A standard from OASIS called Web Services for Remote Portlets (WSRP) is used so portlets can be decoupled from a portal. In part one (JDJ, Volume. 13, issue 3) of this article, we introduced the relevant standards and specifications and then demonstrated WSRP's capabilities by co
Adobe's Kevin Lynch and Microsoft's Scott Guthrie to Keynote AJAX World RIA Conference & Expo
Two of the biggest launches in Rich Internet Application history took place in 2007/2008 when Adobe launched AIR 1.0 in February '08 and Microsoft launched Silverlight (September '07). At the 6th International AJAXWorld RIA Conference & Expo in October SYS-CON Events is delighted
Sun Expects Q4 Earnings Above Estimates
On Tuesday evening Sun issued a fourth-quarter guidance range largely above analysts' estimates. The company pre-announced that revenue for its fiscal fourth quarter ended June was $3.725 billion to $3.8 billion, with gross margin in the 44-45% range. Sun expects non-GAAP profits
Virtualization Conference Keynote Webcast Live on SYS-CON.TV
Brian Stevens, the Chief Technology Officer and Vice President of Engineering of Red Hat, delivered his Virtualization Keynote 'The Future of the Virtual Enterprise' at SYS-CON's Virtualization Conference & Expo 2007 West in San Francisco. 'Virtualization is the hottest subject
The Beauty of JavaScript
JavaScript is one of the most interesting and misunderstood programming languages in common use today. Most developers will go their entire careers without realizing its full potential. It's not often that you get a language that supports the feature set that JavaScript does, whi
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

SPONSORED BY INFRAGISTICS
SOA in a JVM: OSGi Service Platform - A Dynamic Component System for Java
There are many forces that influence technological evolution. After a decade of building enterprise
AJAX and Enterprise RIA Tools - JSF, Flex, and JavaFX
2008 is going to be an important year for Rich Internet Applications. Most organizations are deliver
Final Voting Phase on OpenAjax Browser Wishlist
The OpenAjax Alliance is developing an Ajax industry wishlist for future browsers, using a dedicated
AJAX World RIA Conference News - Netflix UI Guru To Present on Crafting Rich Web Interfaces
In every field of design one of the first things students do is learn from the work of others. They
Infragistics Releases CTP UI Components for Microsoft Silverlight Beta 2
Infragistics announced the availability of two Community Technology Preview (CTP) User Interface (UI
Yahoo User Interface 2.5.2 Released
The YUI development team has released version 2.5.2; you can download the new release from SourceFor
ADS BY GOOGLE
BREAKING JAVA NEWS
Domark International, Inc. Completes Its Acquisition of Javaco, Inc.
Domark International, Inc. (OTCBB:DOMK) announced today that it has completed its acqui