Open Source Ajax Framework For Java EE Application Developers

ICEfaces RIA Journal

Subscribe to ICEfaces RIA Journal: eMailAlertsEmail Alerts newslettersWeekly Newsletters
Get ICEfaces RIA Journal: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


ICEfaces Authors: Ted Goddard, Steve Maryka, Pat Romanski, Ken Fyten, Shay Shmeltzer

Related Topics: RIA Developer's Journal, ICEfaces RIA Journal, Apache Web Server Journal, AJAX World RIA Conference

RIA & Ajax: Article

AJAX, Flash, Silverlight, or JavaFX...

Must we choose?

AJAX has forever altered user expectations regarding the experience delivered by the Web. In today's world, users sit at the edge of their seat waiting to see what scrumptious eye candy AJAX will serve them next. Some of the more notable visual effects and desktop-like interactions include Prototype-esque fades, Dojo style fisheyes, the near ubiquitous drag-and-drop, and, of course, who can live without the entertainment provided by the assortment of animated loading icons that now distract us while AJAX does its asynchronous "thing." Yes, it would appear that AJAX can do it all and that no desktop visual effect or gesture is safe from being outsourced to the Web.

High-Definition RIA Solutions: What Are They Good For?
This was my opinion, until I saw Apple's new Finder in the company's recently announced Leopard release of OSX. The Finder includes a file browsing feature called Cover Flow, which lets users page through previews of files that are displayed in a three-dimensional carousel. It is visual effects like this - effects that rely heavily on vector graphics - that are difficult to replicate with "pure" AJAX. In fact, competing technologies such as Adobe's Flex, Microsoft's Silverlight, and Sun's recently announced JavaFX render vector graphics substantially better than do AJAX frameworks such as Dojo or Yahoo! UI Library (YUI). Believe it or not, there is a significant business case mounting for Web-based vector graphics in terms of rich Internet application development that extends well beyond savory morsels of eye candy. This need is best represented by data visualization components that display business analytics (e.g., SAP and Oracle) as well as video playback and image editing software (e.g., YouTube and MixBook). Of course, RIA technologies that deliver vector graphics are not limited to the visualization domain; the Flex-based word processor BuzzWord provides a vivid example of one high-definition (HD) RIA solution delivering a complete Web application - one that is set to contend with a more popular application with AJAX roots, namely Google Docs. Thus, vector graphics are not the only thing HD RIA solutions bring to the table. Such frameworks also provide rich facilities for developing applications that deliver sound, sockets (pushing data), local storage, and video - areas where AJAX tends to lag behind.

Is the AJAX Revolution Over?
Does this mean AJAX has met its match? Not at all. It's true that Adobe Flash and similar technologies compete with AJAX, but there are certain limitations to these HD RIA frameworks that prevent them - for the time being - from being an out right replacement for AJAX without some considerable due diligence. Here are a few of the more notable things to consider when deciding between HD RIA solutions and AJAX:
•  Plug-in required: HD RIA solutions require a browser plug-in. As of March 2007, 83.4% of PCs in the U.S., Canada, UK, Germany, France, and Japan have the Flash 9 player installed. Thus, it is arguable that Flash is virtually ubiquitous. However, even with a near universal install base, the need to upgrade a plug-in can be disruptive. More than half of users prompted to upgrade a plug-in upon visiting a site often abandon the redirect to download software and navigate to another site - possibly a competitor's site - in an effort to avoid the hassle of downloading and installing software. Note that neither JavaFX nor Sliverlight currently enjoy a fraction of the market share owned by the Adobe Flash Player. Also note that the 83.4% market share enjoyed by Flash 9 pales in comparison to the native AJAX support found in modern browsers such as IE 7.0, FireFox 2.0, and Safari 3.0.
•  Lack of open standards: AJAX, unlike HD RIA solutions, is built on open standards such as (X)HTML, CSS, and JavaScript. HD RIA is traditionally proprietary with few open source options, much less standards. JavaFX, initially introduced as an open source effort, appears to be the leader at this time in terms of changing the status quo for HD RIA solutions, but it is by far the least evolved.
•  Skills scarcity: Flex, Silverlight, and JavaFX each introduce its own respective language(s). AJAX on the other hand, relies on JavaScript, which is relatively well known, and is readily combined with other popular technologies such as Ruby-on-Rails, PHP, Java, and .NET.
•  Does not play well with HTML: For new applications developed entirely with Flex this is not so much an issue, but for existing applications it can be a considerable problem. AJAX and, moreover, JavaScript, were created to complement HTML. The Flash runtime on the other hand lacks the flexibility to manipulate the structure of existing HTML pages with the ease that the JavaScript DOM object provides.
•  Large download footprint: Flash-based RIA solutions tend to have a larger download footprint than solutions that rely on native AJAX support (e.g., Dojo, ICEFaces, Backbase, or Oracle ADF Faces Rich Client). The consequence of a larger download is a prolonged wait during application startup.
•  Searchable, but not always found: In recent years, search engines have introduced the ability to index swf files into their respective Web crawlers. Yahoo and Google are the most well-advertised supporters of the file format, though the methodology used is not widely published or well understood. To optimize search results, Web designers often build both a Flash and a traditional HTML site or opt for embedded Flash movies within a traditional HTML site as an adornment to text-based content. Note that at the time of writing this article I could not procure information on how or when search engines will address this issue with emerging HD RIA technologies such as JavaFX and Silverlight.
•  All clients are not created equal: With newer PCs, this concern is becoming less of a factor, but since HD RIA environments make heavy use of client resources to execute business logic as well as render visual effects, application performance is governed by the configuration of the client machine. Therefore, the user experience can vary from machine to machine. AJAX-based solutions that come with an inherited server-side component (e.g., Oracle ADF Faces Rich Client) can utilize server resources to off load both processing and rendering to ensure more uniform delivery to clients.

The reader should note that none of the considerations listed should prevent you from choosing Flash or similar products over AJAX. AJAX is certainly not without its own faults - many of which have, in recent years, had more visibility than those found in HD RIA solutions. Some of the more prominent issues that come to mind include slow JavaScript execution, memory leaks, numerous browser bugs, two connection limits, and CSS rendering issues. Simply put, to create an application on the order of Google Maps or GMail with AJAX, you must not be opposed to any manner of hackery. In addition, this article has already identified cases where HD RIA solutions outperform AJAX-based solutions, specifically in the realm of rendering vector graphics. But, at the other end of this equation it is apparent that AJAX is better suited for incremental updates to existing applications than say Flash or other HD RIA solutions, and AJAX is also better equipped to handle text-based content, which is currently the prominent medium for content on the Web - though, the more media-centric, real-time driven Web 3.0 might tip the scale to a richer format in the near future. Thus, currently no RIA solution on the market is absent of limitations.

Fortunately, the limiting factors of both AJAX and HD RIAs are - in general terms - mutually exclusive. Therefore, AJAX and technologies such Flash actually complement each other well and, as sites such as YouTube and SlideShare have proven, can be combined to create robust applications that provide both rich media and dynamic text. But, this introduces yet another dilemma and that is - not all developers are created equal, which conjures up the question of whether this concoction of RIA solutions is achievable by mere mortals?

The Best of Both Worlds, But Not Without Cost
The initial litmus test proves positive. Adobe Labs currently provides a Flex-AJAX Bridge that allows developers to manipulate a Flex application with JavaScript. In addition, the Silverlight DOM is accessible via JavaScript. Thus, HD RIA solutions are already looking to provide integration points for AJAX development. However, despite having APIs for integration, there are other complexities that lie a little further below the surface, namely the problem of finding skilled developers who have knowledge of Flash (or Silverlight and JavaFX), CSS, HTML, and JavaScript with a dash of PHP, Ruby-on-Rails, or Java. In addition, developers' skills are generally split between client and server functions, either being skilled in Flash and/or AJAX, but not server-side technologies. The inverse is also true. Therefore, you may need to hire one Flash and one AJAX guru rather than one or the other - doubling your expenditure on talent. Finally, there are few development tools, much less end-to-end development frameworks, that package all of these technologies into a single rapid application development environment. Ideally such an environment would include methods for visual development and other coding accelerators in addition to tools for declarative data binding. Thus, it would seem that productivity in terms of skills and tools is at a deficit for projects attempting to leverage both Flash and AJAX, or are they?

AJAX and Flash, Together at Last
In 2004, JavaServer Faces (JSF) set out to drastically simplify Web development and it appears that the standard, with the help of a few vendors, is looking to reinvigorate this effort once again. JSF is a server-side component framework that allows developers to use a single API to build Web-based applications that are capable of rendering to multiple devices. The key facet that enables such deployments is a highly flexible rendering engine or more specifically a render kit. Component frameworks such as Oracle ADF Faces have introduced render kits that not only render to HTML browsers, but also telnet clients, WML browsers, and ASK clients, creating multiple channels of delivery without the overhead of having to understand the nuances of the underlying technologies. You can easily see how this concept can be extended to AJAX and Flash. The idea being to create a set of components that render in AJAX as well as Flash, where AJAX is used to deliver enhanced forms, layouts, and data tables while Flash-based components serve more specialized purposes such as mapping, graphing charting, and other data visualization needs. Simply having a single API for development eliminates the need to understand JavaScript, (X)HTML, CSS, XML, JSON, and Flash (or any other RIA solution). Developers simply need to know the semantics of Java and the JSF API. Moreover, the need for deep understanding is lessened by the extensive tooling and visual design times (e.g., Oracle JDeveloper, NetBeans, Eclipse) currently available for JSF. The outcome is a development environment for creating and delivering highly interactive RIAs that are accessible to a broad range of developers with varying levels of skill.

However, despite an extensive choice of tools, there are few JSF component vendors that provide both Flash and AJAX-based components in a single framework. Some of the more notable JSF component vendors distributing AJAX-enabled frameworks include Backbase, ICEsoft, Oracle, JBoss, and ILOG. Presently, Oracle ADF Faces Rich Client represents one of the only frameworks that provides both AJAX- and Flash-enabled components. Moreover, to dispel any notion of proprietary intervention, Oracle recently announced at this year's JavaOne the contribution of Oracle ADF Faces Rich Client to the Apache Foundation as the MyFaces project Rich Client Framework (RCF). RCF demonstrates that JavaServer Faces can provide an open source solution, built on industry standards, that brings RIA developers the best of both worlds - HD RIA and AJAX - under one API.

Resources
•  "How to Choose an RIA Path: AJAX or Adobe?" by Jeffrey Hammond http://ajax.sys-con.com/read/400296.htm
•  "How to Design Flash Pages for Google" by James Gonzalez www.peachpit.com/articles/article.asp?p=454163&rl=1
•  Apache MyFaces Rich Client Framework Proposal http://wiki.apache.org/myfaces/RCF_Proposal
•  www.adobe.com
•  http://labs.adobe.com
•  www.microsoft.com/silverlight/
•  www.sun.com/software/javafx/

More Stories By Ric Smith

Ric Smith is director, business and product strategy at Kaazing. provides Kaazing Corporation with a wealth of experience in product management and consulting for enterprise products and services. Prior to joining Kaazing, Ric was a principal product manager for Oracle's Fusion Middleware at Oracle's Headquarters in Redwood Shores, CA. In his role as a Principal Product Manager he was responsible for the evangelism and product direction of Oracle's AJAX and Java EE Web Tier offerings. Before joining the Fusion Middleware team, Ric worked for Oracle's consulting business as a principal consultant where he led development of mission-critical applications for prominent organizations within the defense/intelligence industry. In addition, Ric won consecutive awards for technical achievement for each year of his tenure as a consultant. Ric is a frequent speaker at international events and has written articles featured in leading industry publications such as Java Developer's Journal and AJAXWorld Magazine. He is also a representative to the OpenAjax Alliance and an honors graduate of the University of Arizona.

Comments (4) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


Most Recent Comments
John Dowdell 09/30/07 07:32:28 AM EDT

Just another draft review
Just another draft review: Ric Smith starts off with a technology comparison at Sys-Con, but a couple of lines bothered me enough to try to correct. A new acronym is introduced... "HD RIA" expanded to "high-definition RIA", but I'm not sure of the sustainability of that term, which refers to use of vectors rather than very large displays of pixels. "More than half of users prompted to upgrade a plug-in upon visiting a site often abandon the redirect to download software and navigate to another site." That might be true for browser extensions which don't already enjoy overwhelming market acceptance, but Adobe Flash Player can't have half of visitors refusing updates, or else v9 couldn't have gotten to +90% viewability... knowing the source link for the stat would help in understanding it. "The 83.4% market share enjoyed by Flash 9 pales in comparison to the native AJAX support found in modern browsers such as IE 7.0, FireFox 2.0, and Safari 3.0." This is the kind of stat I hate, and which prompted me to post. ;-) The problem with vague labels like "Ajax" is that there's no firm measurement... how many browsers handle CSS correctly? Even use of PNG is problematic. You've got to say how much "Ajax" the browsers share... lots of 'em do a little, but tain't no way you get richer Flash-like capabilities in a single development fork to greater degree than Player just via HTML/JS/CSS. It seems plausible that more than 93% of currently-deployed browsers can retrieve text without a page-refresh, but when you get into CSS or SVG or CANVAS, much less video or even basic audio, nobody knows how many implementations there are, how many development & testing paths there must be. Just because a single label "ajax" can be applied to multiple things, doesn't mean that all those things are actually functionally equivalent. But many people don't understand "the map is not the territory". "AJAX, unlike HD RIA solutions, is built on open standards such as (X)HTML, CSS, and JavaScript. HD RIA is traditionally proprietary with few open source options, much less standards." I can't affect the XHTML spec, much less its varied implementations. Adobe has had good stewardship of PostScript -- dismissing with "because it's proprietary" is sloppy thinking. (That's enough of this article, I don't want to read any more.... ;-)

Posted by JohnDowdell at September 27, 2007 06:55 AM

Navot 09/27/07 04:50:19 PM EDT

Have a look at this new option. Maybe the quastion should be AJAX, Flash, Silverlight, or JavaFX...or VISUAL WEBGUI.I would like to draw your attention to a paradigm change, but first let me say it out loud, I am not, and do not pretend to be objective. Judge for yourselves. VWG is a platform that allows window programming, deploying with an empty client concept. No-data, no logic client, no plug-in, just pure browser. Very effective protocol enables payloads of up to 1 kb, a new approach that could change the AJAX programming arena. Have a look. www.visualwebgui.com

David Stevenson 09/20/07 09:31:45 PM EDT

I believe there is a great deal to learn from history. The key determining factors are the performance, strong object orientation, strong type checking and extensive frameworks supported by compiled languages versus that of scripting languages.

ASP, which relied on VBScript (or JavaScript) and COM (Component Object Model) was slower than its competion in Java Server Pages (JSP). JSP used a compiled language with stronger performance, object orientation, type checking and extensive framework libraries than VBScript. JSP was superior to ASP, and required a response from Microsoft. Microsoft's response was C#/VB.NET/ASP.NET, which has strong performance and type checking because it was a compiled language, has object orientation and type checking, with extensive framework libraries.

Today, AJAX is based on HTML, JavaScript, Cascading Style Sheets and XMLHttp. It is a mashup of differing technologies. Its basis in scripting language will yield poorer performance, weak typing and a poorer style of object orientation. Presumably, the analysis for Flash ActionScript is similar.

Microsoft Silverlight brings rich interactive applications the performance of a compiled language with strong type checking, object orientation and extensive libraries. In the final analysis, these will be a major determinant in the selection of the technology to bring RIAs to the web, and it will eventually lead to the decline of usage of technologies which employ scripting languages instead of compiled languages.

JulesLt 09/20/07 12:04:33 PM EDT

A few comments : 83.4% strikes me as likely higher than the combined share of IE7, FF2.0 and the Safari 3.0 beta, all of which still exhibit incompatibilities in CSS and JavaScript implementation - to say nothing of dealing with the still dominant IE6 and Safari 2.0 browsers.

>Lack of open standards: AJAX, unlike HD RIA >solutions, is built on open standards such as >(X)HTML, CSS, and JavaScript.
As a clarification, both JavaScript and Flash/Flex's Actionscript adhere to the ECMAScript standard, while Flex can use CSS based styling, allowing you to share CSS definitions with web-pages. In that sense developers should be able to re-use JavaScript and CSS skills. This will be especially relevant when Mozilla implements the same ECMAScript engine as Flash in Firefox 3.0. Of course, language syntax is a minor point compared to API and library knowledge, and it's in that respect Flash varies enormously from JavaScript.

>• Large download footprint: Flash-based RIA >solutions tend to have a larger download footprint >than solutions that rely on native AJAX support
I'm not convinced on this one - Zimbra takes as long as any Flash app to start up, as does Apple's Ajax based iPhoto web gallery. As Flash SWF files are binary p-code, rather than source, they should in theory always be far smaller than any equivalent JavaScript. The issue here, perhaps, is that the typical usages are different - few people attempt very complex Ajax apps. A second cause is probably the creation of monolithic apps, due to limited understanding of the technology - i.e. dividing a web application into pages is well understood compared to dividing a SWF into dynamically loaded modules.