AJAX Frameworks round-Up

I’ve been fortunate enough to have received various updates on Ajax projects from some of the developers. Right now, there are so many new Ajax frameworks coming out, and so much Ajaxification of existing frameworks, that it’s getting hard to keep track of what does what. So here’s a round-up of Ajax (and related) frameworks, copied from a new page I created on ajaxpatterns.org. I wasn’t actually expecting any patterns of frameworks to emerge, but they did … when you look at all the Ajax-related frameworks out there, you’ll tend to notice four distinct styles, as descibed in the background section. I haven’t yet looked into the revisited Ajax support on Struts/Tapestry/etc.; those might be quite different.

Please visit the ajaxpatterns.org frameworks page for the latest summary of Ajax frameworks. What follows is a current snapshot which won’t be updated.


Thanks to everyone who’s let me know about the frameworks as they emerge. Please mail Michael Maheomff (mailto:[email protected]) about any frameworks not yet here, or any corrections. (This is, for now, just a content management system rather than a true wiki.)

As a summary, the pure Javascript frameworks can be divided into two groups:

  • Infrastructural frameworks: provide basic piping and portable browser abstractions, leaving the content for the developer to create. Typical functionality:
    • Wrapper around XMLHttpRequest to encapsulate browser-server interaction. (All frameworks offer this).
    • XML manipulation and interrogation.
    • Performing DOM manipulation according to responses from XMLHttpRequest.
  • Application frameworks: may offer the above functionality, but are notable for including widget abstractions and other components which are more along the lines of desktop GUI frameworks.

And the server-side frameworks usually work in one of the following two ways (although they are classified according to language):

  • HTML/JS Generation: Server provides complete HTML/Javascript code generation and browser-server co-ordination, so that only browser-side coding is only for customisation.
  • Remote Invocation: Javascript calls routed directly to server-side functions (e.g. Java methods) and returned back to Javascript callback handlers. Or Javascript calls to server to extract information, e.g. session details, database queries.

Pure Javascript: Application Frameworks

DOJO (Under development; from September, 2004)

DOJO (http://dojotoolkit.org/) offers comprehensive widget and browser-server messaging support.

  • Framework for creation of custom Javascript widgets.
  • Library of pre-built widgets.
  • Browser-server messaging support – XMLHttpRequest and other mechanisms.
  • Support for manipulating URLs in the browser.
  • Open-source license (Academic Free License 2.1 (http://opensource.org/licenses/afl-2.1.php)). Led by Alex Russell (http://alex.dojotoolkit.org/) of JotSpot (http://www.jot.com/).

Open Rico (Under development; from May, 2005; based on earlier proprietary framework)

Open Rico (http://openrico.org/demos.page) is a multi-purpose framework with support for Ajax infrastructure and user interaction.

  • An XMLHttpRequest response can be routed to one or more callback operation, DOM object, or Javascript object.
  • Easy drag-and-drop.
  • Ajax animation such as scaling and transitions (and presumably the increasingly common idioms such as progress indicators and fading technique?)
  • “Behaviors” – Essentially a widget library.
  • Open-source. From Sabre Airline Solutions. By Bill Scott (http://looksgoodworkswell.blogspot.com), Darren James, and others.

Pure Javascript: Infrastructure-Focused

AjaxJS (Raw alpha; from May 2005)

AjaxJS (http://ajaxpatterns.org/demo/liveSearch) is a basic threadsafe wrapper around XMLHttpRequest mainly for Ajax newcomers, still raw alpha and under development, only packaged with the AjaxPatterns live search demo for now.

  • RESTful calls to the server (GET/POST/PUT/DELETE) with plain-text or XML routed to a callback operation.
  • Destruction of used XMLHttpRequest objects.
  • Response caching (planned).
  • Aimed at Ajax newcomers – instead of optimising on performance or footprint, the library will aim to be a readable code base and will provide debugging support.
  • Open-source license. By Michael Mahemoff (http://softwareas.com) (with some ideas from John Wehr and Richard Schwartz).

HTMLHttpRequest (Beta; from 2001)

HtmlHttpRequest (http://www.twinhelix.com/javascript/htmlhttprequest/) is an alternative to XMLHttpRequest which uses IFrames for superior compatibility.

  • Tested and Works: IE6/Win, IE5.5/Win, IE5/Win, IE4/Win, Mozilla/Win, Opera7/Win, Safari/Mac, IE5/Mac.
  • Untested, Probably Works: IE4/Mac, Mozilla/Mac, Opera/Other, Konqueror/Linux. Are you using one of these? The author is requesting compatibility info.
  • Open source license (LGPL). By Angus Turnbull of Twin Helix Designs (http://www.twinhelix.com/).

Interactive Website Framework (Under development; from May 2005)

Interactive Website Framework (http://sourceforge.net/projects/iwf/) is a project aiming to support the various aspects of Ajax infrastructure in the browser. Describes itself as a “framework for creating highly interactive websites using javascript, css, xml, and html. Includes a custom xml parser for highly readable javascript. Essentially, all the plumbing for making AJAX-based websites, as well as other common scripts.”.

  • Thread-safe XMLHttpRequest implementation
  • Wrapper around XML document, so you can make more readable code:

   var node = doc.groceries.frozen[0].pizza[0].size;</pre>

instead of manual navigation:

   var node = doc.documentElement.firstChild.firstChild.getAttribute("size");</pre>

  • Open-source license. By Weaver (http://circaware.com|Brock).

LibXMLHttpRequest (Released; June 2003)

libXmlRequest (http://www.whitefrost.com/servlet/connector?file=reference/2003/06/17/libXmlRequest.html) is a thin wrapper around XMLHttpRequest.

  • getXML() and postXML() methods.
  • Pooling of XMLHttpRequest objects.
  • Response caching.
  • Source available (obviously), but protected by standard copyright. By Stephen W. Coate (http://www.whitefrost.com/index.jsp).

Sack (In development; from May 2005)

Sack (http://twilightuniverse.com/2005/05/sack-of-ajax/) pushes the server response directly into a DOM element.

  • Caller specifies the server URL, the data to be sent there, and a DOM element. The DOM element’s HTML/content will be replaced with the response.

Sarissa (Released; from February, 2003)

Sarissa (http://sarissa.sf.net) is a Javascript API which encapsulates XML functionality in browser-independent calls.

  • Portable XMLHttpRequest creation.
  • Portable XPath queries.
  • Portable DOM manipulation.
  • Portable XSLT.
  • Portable serialisation to XML.
  • Open-source (GPL 2.0 and LGPL 2.1. IANAL and wouldn’t have a clue how it can be both at the same time.). From various contributors.

XHConn (Released; from April, 2005)

XHConn (http://xkr.us/code/javascript/XHConn/) is a thin wrapper around XMLHttpRequest.

  • Example:

new XHConn().connect("mypage.php", "POST", "foo=bar&baz=qux", fnWhenDone);

  • Open-source (Creative Commons Attribution-ShareAlike License). By Brad Fults.

Server-Side: Multi-Language

SAJAX (Workable but not 1.0; from early 2005?)

SAJAX (http://www.modernmethod.com/sajax/) routes calls directly from Javascript into your server-side language and back out again. So, for example, calling a javascript method “x_calculateBudget()” will go the server and call a Java calculateBudget() method, then return the value in javascript to x_calculateBudget_cb().

  • Faciliates mapping from Javascript stub function to back-end operation.
  • Capable of stubbing calls to numerous server-side platforms: ASP/ColdFusion/Io/Lua/Perl/PHP/Python/Ruby.
  • Open-source license. From various contributors.

JSON and JSON-RPC

JSON (http://www.crockford.com/JSON/index.html) is a “fat-free XML alternative” and JSON-RPC (http://www.json-rpc.org/) is a remote procedure protocol, akin to XML-RPC, with strong support for Javascript clients.

Server-Side: .NET (Under development; from March 2005)

Ajax.Net (http://ajax.schwarz-interactive.de/csharpsample/default.aspx) is a library enabling various kinds of access from Javascript to server-side .NET.

  • Like SAJAX, can pass calls from Javascript into .Net methods and back out to Javascript callbacks.
  • Can access session data from Javascript.
  • Caches results.
  • Free to use, source available, unspecified license. By Michael Schwartz (http://weblogs.asp.net/mschwarz/).

Server-Side: Java

Note: Many existing frameworks have recently been adding Java support (e.g. struts), and I will link to those later on.

Echo 2 (from March 2005)

Echo 2 (http://www.nextapp.com/products/echo2/) allows you to code Ajax apps in pure Java (Demo (http://demo.nextapp.com/InteractiveTest/ia)).

  • Automatically generates HTML and Javascript.
  • Co-ordinates messages between browser and server. Messaging in XML.
  • Can hand-write custom Javascript components if desired.
  • Open-source license (Mozilla Public License or GNU LGPL). From Next App, Inc. (http://www.nextapp.com/).

Direct Web Remoting (DWR; 2005)

Direct Web Remoting (http://www.getahead.ltd.uk/dwr/) is a framework for calling Java methods directly from Javascript code.

  • Like SAJAX, can pass calls from Javascript into Java methods and back out to Javascript callbacks.
  • Can be used with any web framework – Struts, Tapestry, etc.
  • Follows Spring-like KISS/POJO/orthogonality philosophy.
  • Open-source license (Apache (http://www.apache.org/LICENSE.txt)). By Joe Walker (http://www.getahead.ltd.uk/sg/space/joe/). Being incorporated into next WebWork (http://www.opensymphony.com/webwork/) release.

Server-Side: PHP

AjaxAC (From April, 2005)

AjaxAC (http://ajax.zervaas.com.au/) encapsulates the entire application in a single PHP class. From the website:

  • All application code is self-contained in a single class (plus any additional JavaScript libraries)
  • Calling PHP file / HTML page is very clean. All that is required is creating of the application class, then referencing the application JavaScript and attaching any required HTML elements to the application.
  • Built in functionality for easily handling JavaScript events
  • Built in functionality for creating subrequests and handling them
  • Allows for custom configuration values, so certain elements can be set at run time
  • No messy JavaScript code clogging up the calling HTML code – all events are dynamically attached
  • Easy to integrate with templating engine due two above 2 reasons
  • Easy to hook in to existing PHP classes or MySQL database for returning data from subrequests
  • Extensible widget structure to be able to easily create further JavaScript objects (this needs a bit of work though)

Background:

0 thoughts on AJAX Frameworks round-Up

  1. Pingback: Yet Another Blog from Luar » Ajax Framework and Library

  2. I really like the ajax softwares but am wondering if it can be used with normal sites coz i have a webpage full of graphics and images and takes long to load.. Can ajax do something about that.?

  3. Ajax can certainly speed up website performance – the whole Ajax-style architecture is generally faster than traditional web apps. Even more so with smart Ajax design – see the performance optimisation section on AjaxPatterns.org.

  4. well, ajax itself does not speed up a single page load but can make it more userfriendly by loading the important stuff first and letting the user work, then load the rest asynchronously. but yes, ajax helps speeding up web applications due to the fact that redundant data does not need to be retransmitted (like page layout of parts that don’t change during an action)

  5. Checkout this AJAX framework that enables programing outlook web access like applications by programing with WinForms like server side objects. * Works with ASP.NET 2.0 & 1.1 * Fully compatible with Internet Explorer (Mozilla Firefox support is on the way). * Save up to 90% of the traffic. * Provides almost all of WinForms controls and can be extendable. * Does not require any usage of JavaScripts,HTML or any other web language (Full WinForms abstraction). * Unique communication layer enables seemless interaction with the browser. * Automatic optimizations of incremental updating and server postbacks. * Automatic client side caching to reduce round trips. * Leverages a unique “drawing” mechanism to enable getting more out of the same browser (what you do no see does not exist). * Wait behaviors (for server loading times). * Offline support is been developed to enable deployment as a smart client. * Available as a community edition free to all and will soon have an open source version.

  6. ThinWire is another Java, pure Server-Side framework that you might want to look at. It’s open-source under the GPL and will soon be listed on sourceforge. In any case, some of it’s features are:

    • Familiar event-driven GUI programming model
    • Reconnects the flow of logic, no request / response
    • Maintains state naturally via variables, not via session
    • Develop exclusively in server-side language only
    • Rich Set of Complex Widget Components
    • ThinWire downloads once, just over 100K
    • Zero footprint client, no applets, activeX controls or browser plug-ins of any kind!
    • All Major Browsers Supported: Firefox 1, Opera 8, Safari 2, IE6

    http://www.thinwire.com

  7. (One year after original posting – I’m trying to catch up 😉

    May I present you full blown infrastructure+UI Ajax framework for PHP 5: Tigermouse. It is a server side framework that encapsulates Javascript, so you don’t need to hack .js files. It is not a general purpose framework, instead it suits excellent enterprise-level web applications with rich GUI full of lists, menus, buttons, trees and most traditional applications widgets.

    Learn more at http://tigermouse.epsi.pl

Leave a Reply