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.)
- 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):
DOJO (Under development; from September, 2004)
DOJO (http://dojotoolkit.org/) offers comprehensive widget and browser-server messaging support.
- 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.
- 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.
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)
- 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)
- Thread-safe XMLHttpRequest implementation
- Wrapper around XML document, so you can make more readable code:
var node = doc.groceries.frozen.pizza.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)
- 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)
new XHConn().connect("mypage.php", "POST", "foo=bar&baz=qux", fnWhenDone);
- Open-source (Creative Commons Attribution-ShareAlike License). By Brad Fults.
SAJAX (Workable but not 1.0; from early 2005?)
- 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
- Implementations exist for several server-side platforms (http://www.json-rpc.org/impl.xhtml): Java, Python, Ruby, Perl.
- Individual packages and licenses for each platform, e.g. JSON-RPC-Java (http://oss.metaparadigm.com/jsonrpc/).
Server-Side: .NET (Under development; from March 2005)
- Caches results.
- Free to use, source available, unspecified license. By Michael Schwartz (http://weblogs.asp.net/mschwarz/).
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)
- Co-ordinates messages between browser and server. Messaging in XML.
- Open-source license (Mozilla Public License or GNU LGPL). From Next App, Inc. (http://www.nextapp.com/).
Direct Web Remoting (DWR; 2005)
- 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.
AjaxAC (From April, 2005)
AjaxAC (http://ajax.zervaas.com.au/) encapsulates the entire application in a single PHP class. From the website:
- Built in functionality for creating subrequests and handling them
- Allows for custom configuration values, so certain elements can be set at run time
- 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
- Open-source license (Apache 2.0). By Zervaas Enterprises (http://ajax.zervaas.com.au/)