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.

<h1> Pure Javascript: Application Frameworks </h1>

<h3> DOJO (Under development; from September, 2004) </h3>

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/).

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

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.

<h1> Pure Javascript: Infrastructure-Focused </h1>

<h3> AjaxJS (Raw alpha; from May 2005) </h3>

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).

<h3> HTMLHttpRequest (Beta; from 2001) </h3>

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/).

<h3> Interactive Website Framework (Under development; from May 2005) </h3>

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).

<h3> LibXMLHttpRequest (Released; June 2003) </h3>

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).

<h3> Sack (In development; from May 2005) </h3>

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.

<h3> Sarissa (Released; from February, 2003) </h3>

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.

<h3> XHConn (Released; from April, 2005) </h3>

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.

<h1> Server-Side: Multi-Language </h1>

<h3> SAJAX (Workable but not 1.0; from early 2005?) </h3>

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.

<h3> JSON and JSON-RPC </h3>

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.

<h3> Server-Side: .NET (Under development; from March 2005) </h3>

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/).

<h1> Server-Side: Java </h1>

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

<h3> Echo 2 (from March 2005) </h3>

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/).

<h3> Direct Web Remoting (DWR; 2005) </h3>

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.

<h1> Server-Side: PHP </h1>

<h3> AjaxAC (From April, 2005) </h3>

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: