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.

•  "How to Choose an RIA Path: AJAX or Adobe?" by Jeffrey Hammond
•  "How to Design Flash Pages for Google" by James Gonzalez
•  Apache MyFaces Rich Client Framework Proposal

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)

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.