Appendix A. Ajax Frameworks and Libraries

An explosion of libraries and frameworks has been one of the fortunate consequences of the Ajax phenomenon. They come in all shapes and sizes and in any licensing model you’d care to name. Throughout the Ajax Patterns, the importance of using frameworks and libraries has been emphasized—it’s worth knowing the low-level details, but often not worth implementing them yourself. For this reason, the listing here makes a good companion to the Ajax Patterns.

The initial list was published back in June 2005, when I documented what seemed like an overwhelming 20 products. Maintained in an openly editable wiki, it’s blossomed to 160-odd products, and doubtless many still to come—stay tuned to http://ajaxpatterns.org/Ajax_Frameworks for the latest updates.

Some of these were around long before Ajax was “Ajax,” but all are here because they support Ajax development. This section is a lightly edited snapshot of the wiki in January 2006—many of the descriptions come straight from project owners and users. It begins with two sections on pure JavaScript frameworks, where you have to provide your own server-side integration. Following that are frameworks for a large number of server-side environments, many including some JavaScript library API as well as a server-side API. Note that there’s a multilanguage section, since some frameworks address multiple server-side environments. Therefore, consult the multilanguage section in addition to the section for any particular server-side environment you’re interested in.

People getting into Ajax often ask me for a “quick-fix” framework to help get started. So at risk of offending many worthy projects, each section points out a few of the frameworks that have generated buzz. This is, of course, a subjective measure, and it is one of popularity more than intrinsic value; do investigate further for any serious development work. In addition, look at the patterns, many of which discuss specific frameworks.

JavaScript Multipurpose Frameworks

These are pure-JavaScript libraries used to achieve a range of functionality in the browser—usually in a manner that protects you from dealing with browser compatibility issues, as described in Cross-Browser Component (Chapter 12). The Prototype framework has been very popular for general JavaScript infrastructure, and many frameworks mentioned here build on it. At a higher level, Dojo and Scriptaculous are probably the two best known products here and are good options if you’re looking for a multipurpose library. Along those lines, Mochikit and OpenRico have also been popular as well. In the commercial space, there’s been a lot of interest in Backbase and Tibco General Interface, though the products here are so varied, it really depends where you look.

AjaxFace (from 2005)

AjaxFace (http://www.vertexlogic.com) is an Ajax, JavaScript UI framework.

  • High-level JavaScript API for building UI

  • Open architecture for updating and retrieving data from the backend

  • Automatic synchronization of data and UI

  • Easy extensibility

  • High performance

  • Easy customization of look-and-feel through well-defined stylesheets

  • Online demo (http://www.vertexlogic.com/demo.html)

  • Commercial license by VertexLogic

Backbase (from 2003)

Backbase (http://www.backbase.com) is a comprehensive browser-side Ajax framework with cross-browser support. The Backbase Ajax framework is compatible with any server-side platform (e.g., Java, .NET, PHP, or Coldfusion).

Bindows (from 2003)

Bindows (http://www.bindows.net) is a software development kit (SDK) that generates highly interactive Internet applications with richness that rivals modern desktop applications using the strong combination of DHTML, JavaScript, CSS, and XML. Bindows applications require no downloads and no installation on the user side—only a browser is required (no Java, Flash, or ActiveX are used). Bindows is probably the leading object-oriented platform for developing Ajax applications.

The Bindows Framework provides you with the following:

  • A class-based, object-oriented API

  • A complete windowing system with a wide array of supported widgets including menus, forms, grids, sliders, gauges, and more

  • The leading toolkit for developing zero-footprint SOA client-side applications

  • Native XML, SOAP, and XML-RPC support

  • Single-user to enterprise-level support

  • Built-in support for Ajax

The Bindows development environment includes:

  • Enterprise scale projects support

  • Cross-browser, cross-platform support

  • Server independent architecture

  • Interoperability with new and existing resources

  • Uniform development methodology

  • Commercial license, by MB Technologies (based in GA, USA, with the main development center in Sweden, formed in 2002)

Dojo (from September, 2004)

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

  • Extensive deployment support such as dependency-based packaging and compression of required libraries into a single download (see On-Demand JavaScript [Chapter 6]).

  • Framework for creation of custom JavaScript widgets

  • Library of pre-built widgets

  • Solid drag-and-drop, effects, and generic animation support

  • Browser-server messaging support such as XMLHttpRequest and other mechanisms

  • Event management (see Distributed Events [Chapter 10])

  • Support for bookmarkability and manipulating URLs in the browser

  • Open source license (Academic Free License 2.1); led by Alex Russell (http://alex.dojotoolkit.org/) of JotSpot (http://www.jot.com/)

eBusiness Applications (EBA) Ajax Components (from 2002)

EBA (http://www.ebusiness-apps.com/) offers self-contained Ajax components enabling data entry and lookup:

Engine for Web Applications (from 2002)

Engine for Web Applications (http://www.imnmotion.com/projects/engine/) is a framework for building modular components for web applications and separating content from functionality:

  • Configurable deployment

  • Registry for storing, retrieving, and destroying objects that conform to the common interface

  • Message service for intraobject publications and subscriptions

  • Transaction service for asynchronous multiobject communication

  • Task service for bootstrapping client-side modules of a web application and for creating dependency-based task lists; can load an XML-based task.

  • Ability to easily create scoped and redistributable components in XML with automatic event hook-up and containment

  • Store and retrieve form field values regardless of whether the form field still exists

  • Monitor service for easily creating beacon and Ajax monitoring solutions

  • API Documentation (http://www.imnmotion.com/projects/engine/api/engine_api.html)

  • Demonstrations with source (http://www.imnmotion.com/projects/engine/demonstrations/)

  • Open source license (custom license) by Stephen W. Cote (http://www.imnmotion.com/)

Framework for RESTful JavaScript (Freja) (from 2006)

Freja (http://www.csscripting.com/freja) is a JavaScript MVC (Model-View-Controller) framework:

  • Geared toward single-screen, zero-latency web applications.

  • Excellent scalability (much less server roundtrips).

  • True MVC separation.

  • True server-side/client-side code separation.

  • Very light footprint; only a handful of methods to learn (the framework is 25 KB uncompressed).

  • Based on Open Standards (XML/XSLT).

  • Works with any modern web browser: IE, Firefox, Safari, and Opera.

  • Plays well with other JavaScript toolkits and libraries (prototype, Scriptaculous, Dojo, etc.). Freja is not “yet another Ajax library”; it is a Ajax-based, high-level framework. It is not its purpose to provide drag-and-drop functionality or visual effects, but it will let you use your favorite JavaScript library to do so.

  • See Tutorials (http://www.csscripting.com/wiki/index.php?title=Freja#Tutorials) and Documentation (http://www.csscripting.com/wiki/index.php?title=Freja_Documentation).

  • Open source license (CC-GPL).

Mochikit (from 2005)

Mochikit (http://mochikit.com/) is a highly documented and well-tested suite of JavaScript libraries that will help you get your work done fast. Authors borrowed good ideas from Python, Objective-C, etc., and adapted them to JavaScript.

  • MochiKit.Async: manage asynchronous tasks

  • MochiKit.Base: functional programming and useful comparisons

  • MochiKit.DOM: painless DOM manipulation API

  • MochiKit.Color: color abstraction with CSS3 support

  • MochiKit.DateTime: “What time is it anyway?”

  • MochiKit.Format: string formatting goes here

  • MochiKit.Iter: itertools for JavaScript; iteration made HARD, and then easy

  • MochiKit.Logging: we’re all tired of alert( )

  • MochiKit.LoggingPane: interactive MochiKit.Logging pane

  • MochiKit.Visual: visual effects

  • Open source license (MIT license or Academic Free License, v2.1) by Bob Ippolito

OpenRico (from May, 2005; based on earlier proprietary framework)

OpenRico (http://openrico.org/demos.page) is a multipurpose framework with support for Ajax infrastructure and user interaction.

  • An XMLHttpRequest response can be routed to one or more callback operations, 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,” which is essentially a widget library

  • External tutorial by Yonah Russ of Mirimar (http://www.mirimar.net/mailbrowser/)

  • Builds on prototype library

  • Open source license; grew from Sabre Airline Solutions internal product, by Bill Scott, Darren James, Richard Cowin, and others (http://looksgoodworkswell.blogspot.com)

Plex Toolkit

Plex Toolkit (http://www.plextk.org) is an open source feature-complete DHTML GUI toolkit and Ajax framework based on a pure JavaScript/DOM GUI tookit and Ajax framework. Uses the almost identical markup language to PXML (Flex) embedded in ordinary HTML documents for describing the UI. Binding is done with JavaScript.

Pros:

  • Full set of widgets such as datagrid, tree, accordion, pulldown menus, DHTML window manager, viewstack, and more (over 60 libraries)

  • Markup driven (makes it easy to build the interface)

  • Interface components can be easily themed with CSS

  • Client side XSLT for IE and Mozilla

  • Well-documented with examples

  • Multiple remoting transport options such as XMLHttpRequest and IFrame (an RSLite cookie-based coming soon)

  • Back button support (complete history management for all components)

  • Support for YAML serialization

Cons:

  • No animation framework

  • Open source license (GPL, LGPL, or Artistic License; your choice) by Richard Hundt.

Prototype

Prototype (http://prototype.conio.net/) makes it easy to use object-oriented concepts like classes and inheritance within JavaScript. It also supports basic Ajax functionality such as web remoting.

  • A project run in conjunction with Ruby on Rails, but can be (and certainly is) used independent of Ruby or RoR

  • Open source license by Sam Stephenson

qooxdoo (from May, 2005)

qooxdoo (http://qooxdoo.oss.schlund.de/) is another ambitious framework with a broad range of UI and infrastructural features being developed.

Infrastructure:

  • Portable abstraction of the DOM and event/focus management

  • Debugging support

  • Timer class for easy scheduling

  • Getter/Setter support

UI:

  • Widget framework and library of prebuilt widgets

  • Layout managers

  • Image caching and portable PNG transparency

  • Open source license (LGPL) by various contributors

Script.aculo.us (from 2005)

Scriptaculous (http://script.aculo.us) builds on the Prototype library to provide a JavaScript with comprehensive Ajax coverage.

SmartClient (from 2000)

SmartClient (http://www.smartclient.com) from Isomorphic Software is a cross-platform Ajax RIA system.

Cross-browser foundation classes and services:

  • JSON or XML programming

  • Browser abstraction layer

  • GUI component services

  • Logging and debugging services

  • Extensible GUI components

  • Navigation and command controls

  • Form controls and managers

  • Flat, hierarchical, and multidimensional grids

  • Containers and layout managers

Data and services stack:

  • Client data caches and local operations

  • Client data model managers

  • Communication and protocol services

Visual development tools:

  • Runtime console.

  • Log viewer.

  • Component inspector and editor.

  • Admin console.

  • Integrated developer reference.

  • SmartClient Ajax applications run on Internet Explorer, Mozilla, Netscape, Firefox, and Safari web browsers, and on Windows, MacOS, Linux, and Solaris operating systems. Unlike other Ajax systems, SmartClient applications are fully functional even when ActiveX is disabled.

  • See www.smartclient.com for a product brief, live demos, and downloadable SDK.

  • Commercial license by Isomorphic Software.

ThyAPI (from end of 2004)

ThyAPI (http://www.sf.net/projects/thyapi/) is a library of DHTML reusable components. Ajax is only one of its features. Its main purpose is to allow the creation of full desktop-like applications in a browser. ThyAPI is a library based on DynAPI (http://www.sf.net/projects/dynapi/), and open source (LGPL).

  • Made entirely in DHTML (JavaScript + CSS).

  • Totally object-oriented and extensible.

  • Follows XMLRPC protocol, for data exchange with the server. Plans to implement JSON-RPC.

  • Interface definition entirely in CSS.

  • Works in Mozilla Firefox (version 1.0+)(http://www.mozilla.org) and Internet Explorer (version 6+).

  • A DataSource component, to simplify linking of JavaScript widgets with server methods.

  • Cross-browser, cross-platform support (it inherits this characteristic from DynAPI).

  • Aimed to provide RAD development of browser-based applications and reuse of custom-made widgets.

  • Open source license (LGPL).

TIBCO General Interface (from 2001)

TIBCO General Interface (http://www.tibco.com/software/business_optimization/rich_internet_applications.jsp) is a mature Ajax RIA framework that’s been powering applications since 2001. In fact, the framework is so mature, that TIBCO General Interface’s visual development tools themselves run in the browser alongside the Ajax RIAs as you create them.

Interactive Website Framework (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 web sites using JavaScript, css, xml, and html. Includes a custom xml parser for highly readable JavaScript. Essentially, all the plumbing for making Ajax-based web sites, as well as other common scripts.”

  • Has a thread-safe XMLHttpRequest implementation.

  • Contains a wrapper around the XML document, so you can make more readable code, instead of manual navigation:

        var node = doc.groceries.frozen[0].pizza[0].size;
        var node = doc.documentElement.firstChild.firstChild.getAttribute("size");
  • Open source license by Brock Weaver (http://circaware.com).

Zimbra AjaxTK

Zimbra (http://www.zimbra.com/) is a recently released client/server open source email system. Buried deep within this product is an excellent Ajax Tool Kit component library (AjaxTK) written in JavaScript. A fully featured demo of the product is available on zimbra.com that showcases the extensive capabilities of its email client. A very large and comprehensive widget library that was available only in commercial Ajax toolkits is now available to the open source community. Download the entire source tree to find the Ajax directory, which includes example applications.

Pros:

  • Full support of drag-and-drop in all widgets. Widgets include data list, wizard, button, text node, rich text editor, tree, menus, etc.

  • Build system uses Ant, and hosting is based on JSP and Tomcat.

  • Very strong client-side MVC architecture based; architect is ex-Javasoft lead developer.

  • Communications support for client-side SOAP, XmlHttpRequest, and IFrames.

  • Support for JSON serialized objects and JavaScript-based XForms.

  • Strong multibrowser capabilities: IE 5.5+, Firefox 1.0+, latest S.

  • High-quality widgets have commercial quality, since this is a commercial open source product.

  • Widget library is available as a separate build target set from the main product.

  • Debugging facility is built into the library and displays communications request and response.

Cons:

  • Does not currently support keyboard commands in menus and in-place datasheet editing.

  • Does not support graceful degradation to IFrames if other transports are unavailable.

  • Documentation is lacking, but a PDF whitepaper describing widget set and drag-and-drop is available.

  • Open source license (Zimbra Ajax Public License ZAPL, derived from Mozilla Public License MPL) by Zimbra.

JavaScript Remoting Frameworks

As many of the Ajax Patterns establish, Web Remoting (Chapter 6) is error-prone, tedious, and broad in functionality, which makes it ideal to encapsulate in a library or framework like those covered here. The multipurpose frameworks covered earlier will do it too, but if you’re looking for a standalone simple option, SACK is a popular choice. HTMLHttpRequest is a good option for compatibility as it supports IFrames as well as XMLHttpRequest. A more feature-rich API is offered by Ajax Client Engine (ACE).

AjaxCaller (from May 2005)

AjaxCaller (http://ajaxify.com/run/Lib/js/ajaxCaller.js) is a basic, threadsafe wrapper around XMLHttpRequest that is mainly for Ajax newcomers packaged with the Ajax Patterns demos. See TestAjaxCaller (http://ajaxify.com/run/testAjaxCaller).

  • RESTful calls to the server (GET/POST/PUT/DELETE) with plain-text or XML routed to a callback operation

  • Aimed at Ajax newcomers—instead of optimizing performance or footprint, the library aims to be a readable code base and provides debugging support

  • Open source license (Creative Commons) by Michael Mahemoff (http://softwareas.com), with some ideas from John Wehr and Richard Schwartz

Ajax Client Engine (ACE) (from December 2005)

Ajax Client Engine (http://www.lishen.name) is a powerful remoting wrapper.

  • Object-oriented API

  • Cross-browser support

  • Flexible features: request options; request parameter validation; callback argument; callback option; callback timeout; tracing service; caching service; polling service; common callbacks; and exception handling

  • Open source license (MIT) by Li Shen

AjaxGear (from November 2005)

AjaxGear (http://www.ajaxgear.com) is a simple and cross-platform Ajax toolkit.

  • Enables a web browser to make asynchronous call to the web server without the need to refresh the whole page.

  • Use the Ajax class to communicate with the web server.

  • A complete web site is available for download to see AjaxGear in action.

  • Use the AjaxGear.PageEngine.js file to learn how a web site can easily use the toolkit.

  • Three objects are currently being developed as part of the AjaxGear toolkit—namely, progress bar, autocomplete, and form validator.

  • Open source license (MIT) by Allan Spartacus Mangune (http://www.allanmangune.com) of ArchCommerce (http://www.archcommerce.com).

AJFORM (from June 2005)

AJFORM (http://redredmusic.com/brendon/ajform/) is an extremely easy to use Ajax framework. It is designed to be for entry-level Ajax coders. Its single purpose is to send data from any HTML form via XMLHTTP. The AJFORM framework provides you with:

  • Three-step setup

  • Automatic support for any HTML form

  • Ability to implement with little coding knowledge

  • Open source license (BSD)

HTMLHttpRequest (from 2005)

HTMLHttpRequest ( http://www.twinhelix.com/javascript/htmlhttprequest/) also uses XMLHttpRequest and IFrames for improved compatibility.

  • Tested and works in IE6, IE5.5, IE5, and IE4 for Windows; Mozilla for Windows; Opera7 for Windows; and in Safari and IE5 for the Mac

  • Untested, but probably works in IE4 and Mozilla for the Mac; Opera for other programs; and Konqueror for Linux

  • Open source license (LGPL) by Angus Turnbull of Twin Helix Designs (http://www.twinhelix.com/)

JSMX (from Aug 2005)

JSMX (http://www.coldfusion-ajax.com) is a very simple Ajax implementation for ColdFusion Developers (or any language that can easily build JavaScript Strings). This API does not return XML but String representations of JavaScript expressions.

  • Using WDDX and the toScript( ) function within ColdFusion makes converting your ColdFusion objects to JavaScript a snap!

  • Smaller packet sizes over the wire (JavaScript versus XML).

  • Reduced latency due to less parsing of the responses.

  • Parameters can be sent to the server in multiple formats, including strings, objects, and entire forms, without having to build extra logic to handle each type.

  • API has no server-side components, which makes it more portable.

  • Extremely simple syntax shortens the learning curve and speeds up development:

        params = document.myForm;
        http( "POST" , "remote.cfc?method=dosomething", my_callback , params );
  • Open source license (Creative Commons Attribution-ShareAlike) by Todd Kingham.

LibXMLHttpRequest (from June 2003)

libXmlRequest (http://www.whitefrost.com/reference/2005/09/09/libXmlRequest.html) is a thin wrapper around XMLHttpRequest.

  • Synchronous and asynchronous getXML() and postXML( ) methods

  • Pooling of XMLHttpRequest objects

  • Response caching

  • XSL and XPath utilities

  • setInnerXHTML utility for copying XML nodes into an HTML document

  • Source protected by standard copyright by Stephen W. Cote (http://www.imnmotion.com/)

MAJAX (from August 2005)

MAJAX (http://unips.sourceforge.net/devblog/?p=6) is yet another very thin wrapper for XMLHttpRequest. The idea is to have a really simple interface to send and receive ASCII content.

  • Provides handy callback interface for doing actions—e.g., upon server response

  • Open source license (GPL or LGPL) by “Peter F”

RSLite

RSLite (http://www.ashleyit.com/rs/main.htm) is a thin wrapper around a highly cross-browser compatible transport layer comprised of a JavaScript image object request with a querystring parameter and a cookie response.

Sack (from May 2005)

Sack (http://twilightuniverse.com/resources/code/sack/) is a thin wrapper around XMLHttpRequest.

  • Caller can specify callback function or callback DOM object. With a callback DOM, the response text is pushed directly into the DOM.

  • Open source license (modified MIT license) by Gregory Wild-Smith.

Subsys_JsHttpRequest

Subsys_JsHttpRequest (http://www.dklab.ru/lib/Subsys_JsHttpRequest/) is an Ajax framework with XMLHttpRequest support and dynamic “script src” generation to emulate Ajax functional for old browsers that are not compatible with XMLHttpRequest.

  • Open source license (LGPL 2.1 or later) by Dmitry Koterov

XHConn (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 license (Creative Commons Attribution-ShareAlike License) by Brad Fults

JavaScript Effects Frameworks

Fade Anything Technique (FAT)

FAT (http://www.axentric.com/posts/default/7) handles the Yellow Fade Technique (see One-Second Spotlight [Chapter 16]).

  • Open source license (stated as Creative Commons in the page comments) by Adam Michela

Moo.fx (from Oct 2005)

Moo.fx (http://moofx.mad4milk.net) builds on a lite version of the Prototype library to provide an extremely compact effects package.

  • Visual effects

  • Cookie memory for effects

  • 36 KB total file size

  • Open source license (MIT) from Volerio Proietti

JavaScript Flash Frameworks

The Richer Plugin pattern points out how Flash can benefit Ajax development; these frameworks support Ajax-Flash crossovers.

AMFPHPKit

AMFPHP (http://amfphp.sourceforge.net/) is an open source implementation of the Flash Remoting framework.

  • Fast, reliable, 100 percent free, and open source. With this new version, we strived to make a product as stable and full-featured as ColdFusion-based remoting (the reference implementation). You also get to use the wonderful NetConnection debugger, which shows you exactly what’s being sent between the client and server. Remoting uses AMF, a very lightweight binary format that cuts the bulk out of packets, meaning data exchange is a lot faster than with XML.

  • Open source license (GPL) created by Wolfgang Hamann and maintained by various developers.

Flash JavaScript Integration Kit

The Flash JavaScript Integration Kit (http://www.osflash.org/doku.php?id=flashjs) allows for the integration of JavaScript and Flash content.

  • Enables JavaScript to invoke ActionScript functions, and vice versa.

  • All major data types can be passed between the two environments.

  • Open source license (modified Apache 1.1) by multiple open source Flash contributors.

Stream (from July, 2005)

Stream (http://www.stormtide.ca/Stream) is a bi-directional Ajax platform that brings Flash XML socket support to JavaScript. Also includes an extensible open source stateful socket server and client management platform.

  • Plugin API (C# and JavaScript client libraries).

  • No more polling (true server-pushed events; not emulated events through polling); see HTTP Streaming (Chapter 6).

  • Ideal for chat, monitoring, and client interaction systems that would requiring polling.

  • Sessions (per-session and per-page state tracking).

  • Event monitoring (Interact with mouse events, including maximum fire rate throttling).

  • Currently at the Alpha, technology preview, proof of concept stage. Download at http://beta.stormtide.ca/files/StreamReleases/StreamAlphaGPL20050709.zip?source=ajaxpatterns.

  • Dual license open source (Commercial License and GPL) by StormTide Digital Studios. Full source available.

JavaScript XML Frameworks

These libraries support patterns such as XML Message, Browser-Side XSLT, and XML Data Island.

Google AJAXSLT (from June 2005)

Google AJAXSLT (http://goog-ajaxslt.sourceforge.net/) is a JavaScript framework for performing XSLT transformations, as well as XPath queries.

  • Builds on Google Map work

  • Open source license (BSD) by Google

Sarissa (from February, 2003)

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

  • Portable XMLHttpRequest creation

  • Portable XPath queries

  • Portable DOM manipulation

  • Portable XSLT

  • Portable serialization to XML

  • Open source license (GPL 2.0 or LGPL 2.1, your choice) by various contributors

JavaScript Specialized Frameworks

These are a couple of useful libraries that don’t fit well in other sections.

Drag-Drop

Walter Zorn’s Drag-Drop library (http://www.walterzorn.com/dragdrop/dragdrop_e.htm) is a well-featured drag-and-drop library (see also Drag-And-Drop [Chapter 15]).

  • Open source license (LGPL 2.1 or later) by Walter Zorn

Giant-Ass Image Viewer (GSV)

GSV (http://mike.teczno.com/giant/pan/) lets you place a massive image on the server and allow the user scroll around as if it was all stored locally (like scrolling around Google Maps; see Virtual Workspace [Chapter 15]).

  • Open source license (custom) by Michael Migurski

Multilanguage Ajax Frameworks

Each library here integrates browser-side JavaScript with several server-side languages. Usually, an individual project will only need to integrate with one server-side language, but the library includes several to make it applicable to a broader market. JSON has had a big impact, because it is as much a popular data format as it is a collection of open source libraries for remoting. SAJAX has also received considerable attention in this area, in part because it supports so many languages. CPAINT is popular as well.

Cross-Platform Asynchronous INterface Toolkit (CPAINT) (from May 2005)

CPAINT (http://cpaint.sourceforge.net/) is a true Ajax implementation and a JSRS (JavaScript Remote Scripting) implementation that supports both PHP and ASP/VBScript. CPAINT provides you the code required to implement Ajax and JSRS on the backend, while the returned data is manipulated, formatted, and displayed on the frontend in JavaScript. This allows you to build web applications that can provide near real-time feedback to the user. See Ajax Stub (Chapter 9).

  • Supports both PHP and ASP

  • Unified JavaScript file for all functions

  • Supports both remote scripting and XML

  • Supports both local and remote functions

  • Single or multiple XMLHTTP objects

  • Returns backend data as text or as a JavaScript XML/DOM document object

  • Can support both POST and GET requests

  • Backend proxy functions for accessing remote functions and data

  • Tested with all major browsers

  • Open source license (GNU, GPL, and LGPL) by various contributors

JavaScript Object Notation (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. See JSON Message (Chapter 9).

  • Implementations (http://www.json-rpc.org/impl.xhtml) exist for several server-side platforms such as Java, Python, Ruby, or Perl.

  • Individual packages and licenses for each platform. Original concept and JavaScript implementation by Douglas Crockford.

JavaScript Remote Scripting (JSRS) (from 2000)

JSRS (http://www.ashleyit.com/rs/jsrs/test.htm) routes calls directly from JavaScript into your server-side language and back out again.

  • Initially developed back in 2000

  • Known browsers: IE4+, NS4.x, NS6.x, Mozilla, Opera7, and Galeon

  • Server-side support for ASP, ColdFusion, PerlCGI, PHP, Python, and JSP (servlet)

  • Open source license (very flexible custom license) by Brent Ashley (http://www.ashleyit.com/)

Rialto: Rich Internet AppLication TOolkit

Rialto (http://rialto.application-servers.com/) is a cross browser JavaScript widgets library.

  • Because it is technology agnostic, it can be encapsulated in Java/JSP/JSF, .NET, or PHP-graphic components.

  • The widgets library includes forms, drag-and-drop, tree, data list with fix header and resizable columns, pop up, and splitter.

  • Enables single-page interface-application development.

  • Demo available (http://rialto.application-servers.com/demoRialto.jsp).

  • Open source license (Apache) by multiple contributors.

SAJAX (from March 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 an ASP/ColdFusion/Io/Lua/Perl/PHP/Python/Ruby calculateBudget( ) method, and then return the value in JavaScript to x_calculateBudget_cb( ).

  • As described in Ajax Stub (Chapter 9), facilitates mapping from the JavaScript stub function to a backend operation.

  • See a demo walkthrough in the "Real-World Examples" of Ajax Stub.

  • Capable of stubbing calls to numerous server-side platforms: ASP, ColdFusion, Io, Lua, Perl, PHP, Python, or Ruby.

  • Open source license (BSD) by various contributors.

ZK—Ajax/XUL Web Framework

ZK (http://zk1.sourceforge.net/) is an Ajax-based, event-driven, XUL-based, all Java framework designed to enable Web applications to have both rich user experiences and a simple programming model.

  • With ZK, represent and manipulate RIA in XUL/HTML components that are all running at the server, as has been done for years in desktop applications.

  • No JavaScript. No replication of business logic at the clients. No proprietary components. No compilation. ZK works with existent frameworks and technologies, such as JSF and portals. The pace of adapting ZK is all under your control.

  • XUL-based components.

  • Event-driven model.

  • Server-centric processing.

  • Script in Java and EL expressions.

  • Demo available (http://www.potix.com/zkdemo/userguide).

  • Open source license (GPL) by Potix Corporation.

C++ Ajax Frameworks

Wt

Wt (http://witty.sourceforge.net/) is a C++ widget library, which uses Ajax to render changes to the widget tree when available.

  • API inspired by existing GUI libraries. It targets C++ application developers.

  • The widget library makes complete abstraction of the underlying technology (JavaScript, HTML, Forms, CGI, Ajax).

  • Documentation is at http://jose.med.kuleuven.ac.be/wt/doc/index.html.

  • Open source license (Affero General Public License) by Koen Deforche.

ColdFusion Ajax Frameworks

AjaxCFC

AjaxCFC (http://www.robgonda.com/blog/projects/ajaxcfc/) is a ColdFusion framework meant to speed up Ajax application development and deployment by providing developers seamless integration between JavaScript and ColdFusion. It also provides built-in functions that quickly adapt to any type of environment, security, and help overcoming cross-browser compatibility problems. It contains:

  • ColdFusion components following the best practices of object-oriented programming and design patterns. Programming with AjaxCFC involves extending components and creating your own Ajax facades.

  • Restricted open source license (free to use in any context but not redistributable) by Rob Gonda.

JSMX (from August 2005)

JSMX (http://www.coldfusion-ajax.com) is a very simple Ajax implementation for ColdFusion developers (or for any language that can easily build JavaScript Strings). This API does not return XML but String representations of JavaScript expressions.

  • Smaller packet sizes over the wire (JavaScript versus XML).

  • Reduced latency due to less parsing of the responses.

  • Parameters can be sent to the server in multiple formats including strings, objects, and entire forms without having to build extra logic to handle each type.

  • API has no server-side components, which makes it more portable (planned).

  • Extremely simple syntax shortens the learning curve and speeds up development:

    params = document.myForm;
    http( "POST" , "remote.cfc?method=dosomething", my_callback, params );
  • Open source license (Creative Commons Attribution-ShareAlike) by Todd Kingham.

.NET Ajax Frameworks

In the .NET world, all eyes are on Microsoft with their in-progress Atlas framework. It’s not yet clear exactly what it covers, how portable it will be, and how it will affect the existing frameworks here. In any event, Michael Schwartz’s Ajax.NET is one popular choice, and for a broader-scoped framework, the Monorail project—similar to Ruby on Rails—has a lot of interest too.

Ajax.NET for ASP.NET 1.x/2.0

Ajax.NET (http://ajax.schwarz-interactive.de/csharpsample/default.aspx) is an Ajax framework for ASP.NET 1.x/2.0.

  • A basic Ajax library for ASP.NET that provides the very basic Ajax capability to make XMLHTTP callbacks. Does not have any Ajax-enabled controls or support for Viewstate, etc.

  • Open source license by Michael Schwartz.

Anthem.NET for ASP.NET 1.x/2.0

Anthem.NET (http://anthem-dot-net.sourceforge.net/) is Jason Diamonds’ new version of a long-established Ajax library, now a SourceForge open source project.

  • Athem.NET provides a set of Ajax-enabled controls inherited from ASP.NET server controls, with most Ajax behaviors pre-built, avoiding lots of client JavaScript. It supports Viewstate so that you can actually modify server controls (either Anthem controls or ASP.NET controls inside an Anthem control—e.g., panel) in your server-side code, in C# or VB without having to mess about in JavaScript. Still in its early days (DEC 2005) but promising!

  • Open source license by Jason Diamonds.

AjaxAspects

AjaxAspects (http://www.mathertel.de/AJAXEngine/) is an engine that uses JavaScript proxies to call server-side web service methods.

  • Use Ajax with web services.

  • Built upon JavaScript client proxy methods for standard web services. (Just call a regular JavaScript method to call a method on the server.)

  • Standard SOAP and WSDL is reused for the communication between client and server.

  • No need for special implementations in web services.

  • Multiple types, arrays and XML objects are supported as parameters and return values.

  • Caching on the client and server.

  • Queuing actions.

  • Delaying actions.

  • Many Ajax controls available that integrate in standard ASP.NET web forms.

  • Supporting ASP.NET 2.0.

  • Full source code available.

  • Demo web site available (http://www.mathertel.de/AjaxEngine/).

  • Supported by a blog in English (http://ajaxaspects.blogspot.com/) and German (http://ajaxaspekte.blogspot.com/).

  • Open source license (Creative Commons license) by Matthias Hertel (http://www.mathertel.de).

Atlas (from late 2005)

Atlas (http://www.asp.net/default.aspx?tabindex=7&tabid=47) is Microsoft’s in-progress Ajax project. ASP.NET Atlas is a package of new web development technologies that integrates an extensive set of client script libraries with the rich, server-based development platform of ASP.NET 2.0.

  • Commercial (license terms unclear at time of writing) by Microsoft

Bitkraft for ASP.NET

Bitkraft (http://www.tiggrbitz.com) is a CLR-based (.NET) web framework that allows distributed web content to be created and served in a unique fashion. It is written in C# and compiles for operation under the Microsoft .NET Framework 1.1+ or the .Mono Framework, making it portable to almost any platform.

At its core, the Bitkraft framework extends the ASP.NET architecture to fully support JavaScript-based server callbacks using the XmlHttpRequest object as a transport layer in Ajax.

  • Known browsers: IE5+, Firefox1+, and Netscape 6

  • Server-side support for ASP.NET, Mono XSP, Cassini, and Apache (modMono) .NET Framework 1.1+

  • Attribute driven

  • Asynchronous and synchronous methods mapped directly from JavaScript proxy objects to the server

  • Supports all .NET types and custom classes mapped to the JSON object on the client

  • Uses JSON instead of XML

  • Open source library by Wayne Lee-Archer

ComfortASP.NET for ASP.NET 1.1/2.0

ComfortASP.NET (http://www.comfortasp.de) is an approach that lets developers rely on pure ASP.NET programming while offering Ajax features. Internally, ComfortASP.NET uses Ajax (using DHTML, JavaScript, XMLHTTP) to implement these features—but the web developer implements only pure server-side ASP.NET!

  • Automatically transfer only changes between ASP.NET postbacks, which leads to significantly faster response for low bandwidth connections and less overall HTML traffic (up to 90 percent, depending on new postback data)

  • Reduce page reloads and use hidden postbacks instead

  • Ajax/DHTML-like client experience (but without programming any Ajax/DHTML directly)

  • Keep browser history free of postback entries (the Back button no longer irritates your users)

  • Autodisable form and prevent user input while using postback or multiple form postbacks

  • Control web client scroll position and focus from the server-side code

  • Switch back at all times to original ASP.NET when you need it—even dynamically at runtime

  • Open source license by Daniel Zei

MagicAjax.NET (from September 2005)

MagicAjax.NET (http://www.magicajax.net/) is an open source framework designed to make it easier and more intuitive for developers to integrate Ajax technology into their web pages, without replacing the ASP.NET controls and/or writing JavaScript code.

  • Just make the initial setup, put the controls you want to Ajax-enable inside an AjaxPanel, and you’re done!

  • Many other features also available if you really want the advanced features as well.

  • Open source license (LGPL) by various contributors.

MonoRail (from May 2005)

MonoRail (http://www.castleproject.org/index.php/MonoRail) is a platform for developing C# web applications using templates instead of the webform-based approach.

  • Functionally similar to Ruby on Rails

  • Generates most or all of the JavaScript for widgets and animation in the browser

  • Provides helpers that work with the Prototype JavaScript library (http://prototype.conio.net/)

  • Functions on the .NET and .Mono platforms on both Windows and Linux

  • Open source license by multiple developers

WebORB for .NET (from August 2005)

WebORB for .NET (http://www.themidnightcoders.com/weborb/aboutWeborb.htm) is a platform for developing Ajax and Flash-based rich client applications and connecting them with .NET objects and XML web services (see online examples at http://www.themidnightcoders.com/examples).

  • WebORB includes a client-side library called Rich Client System (http://www.themidnightcoders.com/rcs/index.htm). The Rich Client System provides a simple one-line API to bind to and invoke any method on any .NET object or XML web service.

  • Supports synchronous and asynchronous method invocations.

  • Does not require any modifications on the server-side code, and there is no need for custom method attributes, special signatures, or argument types. Does not require design-time stub generation.

  • Synchronous invocations return data from the same invocation (no callback needed). Asynchronous invocations rely on a callback.

  • Any server-side method can be invoked synchronously or asynchronously.

  • Client application can request special activation modes for the server objects. As a result, objects can easily become stateful without any special programming.

  • Provides a special API for handling database query results—server code can return DataSets or DataTables and the client presents it as a special RecordSet JavaScript object. The object provides a way to retrieve column names as well as row data.

  • Supports data paging. Client applications can retrieve data in pages, thus streamlining user experience.

  • Supports all server-side argument types as well as return values—primitives, strings, complex types, arrays, native .NET collections, and remote references.

  • Dual license (standard edition is free, professional is commercial) by Midnight Coders.

zumiPage

With zumiPage (http://www.zumipage.com), postbacks to the server are automatically captured on the client side and sent via an XMLHTTP mechanism.

  • zumiPage requires no code changes to existing projects, so you can write code for ASP.NET as you always do, using the standard web controls and methodology. zumiPage will take care of the rest. Your web application should be smoother, faster, and more interactive.

  • Works with ASP.NET 2.0 and 1.1.

  • Fully compatible with Internet Explorer and Mozilla Firefox.

  • Save up to 90 percent of the traffic.

  • Easy to integrate with existing projects.

  • Does not require any use of JavaScript.

  • Fast, invisible XMLHTTP postbacks.

  • Full control over returned controls on each postback.

  • Wait behaviors (for server-loading times).

  • Commercial license by Amir Leshem.

Java Ajax Frameworks

Java has always had many wide and varied frameworks. With Ajax, we’ve seen new ones emerge, and we’ve also seen add-ons for the earlier projects. Two popular libraries have been the Ajax JSP Tag Library and Direct Web Remoting.

AjaxAnywhere (from September 2005)

AjaxAnywhere (http://ajaxanywhere.sourceforge.net) returns any set of existing JSP, JSF, Struts, Spring, etc., components into Ajax-aware components without JavaScript coding. (see the Quick Start Demo at http://ajaxanywhere.sourceforge.net/quickStart.html).

  • Does not break existing server-side MVC architecture.

  • Less JavaScript to develop and maintain. Absence of commonly accepted naming conventions, formatting rules, and patterns makes JavaScript code messier then Java/JSP. It is extremely difficult to debug and unit-test in multibrowser environments. AjaxAnywhere eliminates all these complexities.

  • Easy to integrate. AjaxAnywhere does not require changing the underlying application code.

  • Graceful degradation. Switch whenever you need to between Ajax and the traditional (refresh-all-page) behavior of your web application. Your application can also support both behaviors.

  • Open source license (Apache 2).

AJAX JSP Tag Library

The AJAX JSP Tag Library (http://ajaxtags.sourceforge.net/) is a set of JSP tags that simplify the use of Asynchronous JavaScript and XML (Ajax) technology in JavaServer Pages. This library eases development by not forcing J2EE developers to write the necessary JavaScript to implement an Ajax-capable web form. The tags are:

Autocomplete

Retrieves a list of values that matches the string entered in a text form field as the user types.

Callout

Displays a callout or pop-up balloon, anchored to an HTML element with an onclick event.

Select

Based on a selection within a drop-down field, a second select field will be populated.

Toggle

Switches a hidden form field between true and false and at the same time switches an image between two sources.

Update Field

Updates one or more form field values based on response to text entered in another field.

Open source license by multiple contributors.

AJAX Java Server Faces Framework

AJAX-JSF (http://smirnov.org.ru/en/ajax-jsf.html) will make any existing Java Server Faces applications use Ajax functionality. Most existing components can be used as is or easily converted to support Ajax.

  • See a worked example called MyFaces JSF Tree, with table scroller and a tabbed pane as Ajax components (http://smirnov.org.ru/myfaces-ajax/ajax.jsf).

  • Minimal differences from JSF specifications. This is proposal to the MyFaces project.

  • Open source license (Apache Software License 2.0) by Alexander Smirnov.

Direct Web Remoting (DWR) (from 2005)

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

Echo 2 (from March 2005)

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

  • Automatically generates HTML and JavaScript

  • Coordinates messages between browser and server. Provides messaging in XML

  • Can hand-write custom JavaScript components if desired

  • Open source license (Mozilla Public License or GNU LGPL) by Next App, Inc. (http://www.nextapp.com/)

Guise

Guise (http://www.guiseframework.com/) provides an elegant server-side component architecture that doesn’t require developers to write HTML or JavaScript (see the demo at http://www.guiseframework.com/demonstration).

  • A true application framework, written completely in Java

  • Allows developers to think in terms of component and events instead of HTML generation and DOM programming

  • Provides controls, modal dialogs, flyovers, and more

  • XHTML-compliant

  • Flexible commercial license, with free full-featured development version available for immediate download by Global Mentor Inc.

ICEfaces

ICEfaces (http://www.icesoft.com/products/icefaces.html) is a standards-compliant extension to JavaServer Faces (JSF) for building and deploying rich Ajax applications.

  • Smooth, incremental page updates with in-place editing and no full page refresh

  • User context preservation during page update, including scrollbar positioning and user focus

  • Asynchronous page updates driven from the application in real-time

  • Fine-grained user interaction during form entry that augments the standard submit/response loop

  • Commercial license by IceSoft

JSON-RPC-Java (from April 2004)

JSON-RPC-Java (http://oss.metaparadigm.com/jsonrpc/) is an Ajax RPC middleware that allows JavaScript DHTML web applications to call remote methods in a J2EE Application server.

  • Transparently maps Java objects to and from JavaScript objects using Java reflection

  • Handles marshalling/unmarshalling of arbitrarily complex nested data structures

  • Lightweight protocol similar to XML-RPC

  • Leverages the J2EE security model with session specific exporting of objects

  • Open source license (LGPL) by Michael Clark and others

JSP Controls Tag Library (from December 2005)

JSP Controls Tag Library (http://jspcontrols.sourceforge.net/) provides the lifecycle for portlet-like JSP components. The library does not require a portal engine or other central controller. The components built with the Library can be used in any JSP-based application.

  • Supports dual-mode components (non-Ajax and Ajax). Therefore, it works even with Netscape 4.

  • In non-Ajax mode, components utilize synchronous HTTP request/response cycles via the Redirect-After-Post pattern.

  • In Ajax mode, components are updated in place.

  • Component reload in non-Ajax mode is completely automatic and transparent.

  • Transition between Ajax and non-Ajax mode is undetectable when JavaScript is turned on or off.

  • See the demo at http://www.superinterface.com/jspcontrols/index.html.

  • Open source license (Apache 2.0) by Michael Jouravlev.

jWic

jWic (http://www.jwic.de) is a Java-based development framework for developing dynamic web applications with the convenience and familiarity of rich client-style programming.

  • Component-based, event-driven programming model.

  • Controls are rendered using templates (i.e., Velocity).

  • Dynamically updates a control using Ajax mechanisms.

  • Open source licence (Apache Licence, Version 2.0) by Florian Lippisch and Jens Bornemann.

Struts-Layout

Struts-Layout (http://struts.application-servers.com) is a tag library for Apache Struts that provides easy and fast interface creation. This is achieved by powerful tags that display panels, input fields, tables, treeviews, sortable lists, datagrids, popups, calendars, etc. With those tags customized to your own preference, some of the developers in your team don’t have to write or even know HTML.

SWATO (from 2005)

SWATO (Shift Web Application TO...)( http://swato.dev.java.net/) is a set of reusable and well-integrated Java/JavaScript libraries that give you an easier way to shift the interaction of your web apps through Ajax.

  • The server-side Java library can be easily deployed in all Servlet 2.3+-compatible containers.

  • The client-side JavaScript library is based on the prototype that can help you code your JavaScript the object-oriented way.

  • Uses JSON to marshal the data of your POJOs (Plain Old Java Objects) on the server side.

  • Provides a simple interface for your JavaScript code to interact with the remote POJOs exposed to the client side such as RPC or cross domain access.

  • Easy and flexible configuration using <servlet> and <filter> in web.xml. Comes with Spring integration.

  • Comes with several reusable components (Auto-suggest Textbox, JS Template, JS Logger, etc.) that help you develop your web apps easier.

  • Online demo available at http://swato.throughworks.com.

  • Open source license (Apache) by Zhijie Chen.

Tacos Tapestry Components (from December 2005)

Tacos (http://tacos.sourceforge.net) is an Ajax engine/component library for Ajax/DHTML-based applications written in Java for the Tapestry web framework (http://jakarta.apache.org/tapestry).

  • Written to be completely integrated with the Dojo JavaScript library (http://dojotoolkit.org), provides an extensive set of widgets and features.

  • Requires little or no JavaScript knowledge to use, though any part of the process can be customized to your liking.

  • Provides development tools such as a logging/debug console window for Ajax/other JavaScript-initiated requests that make writing Ajax applications much easier.

  • Component library hosts extensive set of production quality code, with a built-in functionality that includes dialogs, floating windows, tons of effects, tree, autocompleter, Inline Editor, etc.

  • Extensive form-based Ajax support includes client-side validation, field observers, partial form submissions, etc.

  • Open source license (Apache) by multiple contributors.

ThinkCAP JX

ThinkCAP JX (http://www.clearnova.com) is designed to build industrial strength transactional business applications.

  • Contains Visual Workbench.

  • Based on over 20 open source projects, including Struts, Hibernate, JFreeChart, and many more.

  • Using three-tier client/server development, this minimizes JavaScript by using a server-side generation library of over 150 methods.

  • Handles complex Ajax updates using TransactionSafe. This guarantees no connection leaks and automates complex master-detail updates.

  • Rich data-aware controls include Scrollable Updateable DataView Data Grid, Client Sorting, Outlook Bar, Accordion, Tab Panes, Trees, and Autocomplete.

  • Smart data binding provides declarative binding to HTTP Request or Session Parms.

  • Client and Server Layout Management automatically directs component/Ajax call output to the appropriate default or named areas of a page.

  • Dual license (GPL or commercial) by ClearNova.

WebORB for Java (from August 2005)

WebORB for Java (http://www.themidnightcoders.com/weborb/aboutWeborb.htm) is a platform for developing Ajax and Flash-based rich client applications and connecting them with Java objects and XML web services. (See online examples at http://www.themidnightcoders.com/examples.)

WidgetServer (from 2004)

WidgetServer (https://wiser.dev.java.net) enables you to code Ajax applications in pure Java.

  • Automatically generates HTML and JavaScript

  • Coordinates messages between browser and server

  • Can hand-write custom JavaScript and HTML/CSS components if desired

  • Applications run as web, Swing, and Swing client/server Apps

  • Dual license (higher-performance commercial version and lower-performance open source version) by Dirk von der Weiden

Lisp Ajax Frameworks

CL-Ajax

CL-Ajax (http://cliki.net/cl-ajax) directs JavaScript calls directly into server-side Lisp functions.

  • The export function script is as follows:

    (export-function #'my-function)
  • Generates a JavaScript stub with arguments.

  • Can callback to a JavaScript function or DOM object.

  • May be integrated into SAJAX.

  • Open source license (custom, very flexible, license) by Richard Newman (http://www.holygoat.co.uk/).

Perl Ajax Frameworks

CGI::Ajax—Export Perl Methods to JavaScript for Ajax

CGI::Ajax (http://pjax.sourceforge.net/) is a Perl module to make it trivial to write Ajax scripts using Perl. The module is object-based Perl, and creating a link from a JavaScript event to your Perl code is as easy as defining the JavaScript function name to Perl subroutine name mapping.

  • Can be used to link any Perl code to an HTML event, including fetching other URLs (using LWP, for example)

  • Nestable, so an HTML event can start a chain of Ajax events (e.g., onClick= "do_this( ); now_that(); finally_this( )")

  • Can handle GET or POST

  • Not necessary to have your exported subroutines named in a specific way—name them what you want

  • Very small overhead—allows you to keep thinking Perl and not get bogged down

  • Active development community

  • Open source library (Perl and Artistic license) by Brian Thomas

HTML::Prototype—Generate HTML and JavaScript for the Prototype Library

HTML::Prototype (http://search.cpan.org/dist/HTML-Prototype/) contains some code generators for Prototype, the famous JavaScript object-oriented library, and the script.aculous extensions.

  • Basically similar to the Prototype helpers in Ruby on Rails

  • Open source license (GPL and Artistic) by multiple contributors

PHP Ajax Frameworks

PHP frameworks tend to focus more on remoting than HTML generation. XOAD is one popular remoting library, as well as CPAINT and SAJAX (covered earlier in "JavaScript Multipurpose Frameworks“).

AJASON

AJASON (http://ajason.sourceforge.net/) is a PHP-based framework.

  • Uses JSON (JavaScript Object Notation) to encode/decode data between server and browser

  • Open source license by multiple contributors

AjaxAC (from April, 2005)

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

  • All application code is self-contained in a single class (plus any additional JavaScript libraries).

  • Calling a PHP file or HTML page is very clean. All that is required is creating the application class, and 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 runtime.

  • No messy JavaScript code clogging up the calling HTML code—all events are dynamically attached.

  • Easy to integrate with templating engine.

  • Easy to hook in to existing PHP classes or MySQL databases for returning data from subrequests.

  • Extensible widget structure to be able to easily create further JavaScript objects (this needs a bit of work though).

  • Open source license (Apache 2.0) by Zervaas Enterprises (http://ajax.zervaas.com.au/).

Cajax

Cajax (http://sourceforge.net/projects/cajax) is a PHP object-oriented framework that creates and handles server-side requisitions though JavaScript remote calls. Some features are:

  • Simple server-side programming

  • Almost no client-side programming (less JavaScript writing is possible)

  • Handler for server-side events

  • A suggest handler like Google’s

  • Plugin for multiple selects (like country/state/city)

  • Remote server calls directly from JavaScript, using an abstraction layer

  • Plugin for submitting forms though XMLHTTPRequest

  • JavaScript caching

  • Open source library (LGPL) by Thiago Pappacena

HTS Web Application Framework

HTSWaf (http://www.htsdesign.com/index.php?&section=htswaf&page=index) provides seamless client-to-server event handling.

  • The HTS Web Application Framework is a PHP- and JavaScript-based framework designed to make simple web applications easy to design and implement. The framework implements a custom tag engine with an automated JavaScript and/or PHP event model and automates the transfer of data to and from the server.

  • Visit the web site for more info and examples (http://www.htsdesign.com/index.php?&section=htswaf&page=index).

  • Currently in demo stage, by Bert Rosell.

JPSpan

JPSPAN (http://jpspan.sourceforge.net/wiki/doku.php) passes JavaScript calls directly to PHP functions.

  • Heavily unit-tested

  • Open source license

PEAR::HTML::Ajax

PEAR::HTML:Ajax (http://pear.php.net/package/HTML_AJAX) is a PHP and JavaScript Ajax library.

  • Provides PHP and JavaScript libraries for performing Ajax (communicates from JavaScript to your browser without reloading the page).

  • Offers object-oriented (OO) proxies in JavaScript of registered PHP or proxyless operations.

  • Serialization of data sent between PHP and JavaScript is provided by a driver model. Currently JSON and Null encodings are provided.

  • Open source license (LGPL) by multiple contributors.

Pipeline

The Pipeline framework (http://livepipe.net) consists of a simple client-side library and direct integration with the controller. It’s main focus is on simplicity, it is not feature rich, and does not use XML. It favors returning HTML or Strings from the controller, or associative arrays that get translated from PHP into JavaScript.

  • Open source license with commercial add-ons in development by Picora Pipeworks.

Symfony

Symfony (http://www.symfony-project.com) integrates a server-side Ajax layer together with helpers “à la” script.aculo.us, to provide an easy way to build Ajax applications in PHP.

  • A step-by-step tutorial is available (http://www.symfony-project.com/tutorial/symfony_ajax.html) describing the creation of an interactive shopping cart. This demonstrates the tight integration of prototype, script.aculo.us, and the MVC model.

  • The Advent Calendar initiative (http://www.symfony-project.com/askeet) illustrates how to build a real Ajax application in 24 short tutorials, complete with downloadable code. Interactive form submission, Folksonomy, and visual effects are some of the Ajax features of the askeet web site (http://www.askeet.com) they are building live. A must see.

  • Open source license (MIT License), sponsored by Sensio.

XAJAX

XAJAX (http://www.xajaxproject.org) passes JavaScript calls directly to PHP functions.

  • Use JavaScript stubs to call functions, object methods, and class methods in a PHP script.

  • The response is created using the XAJAX response object, which provides numerous commands, such as assigning HTML to an element, displaying an alert, and more. Custom script output is also supported.

  • All browser-specific code (such as using XMLHttpRequest) is abstracted, and sending various types of data to the server (including form submission via Ajax) is very easy to accomplish.

  • It supports a number of configuration options to allow easy integration with existing web apps and frameworks.

  • The JavaScript core is easy to understand and can be overridden to support more advanced JavaScript functionality.

  • Well-supported via forums and a new wiki with documentation and tutorials.

  • Open source license (LGPL) by J. Max Wilson and Jared White.

XOAD (formerly NAJAX)

XOAD (http://www.xoad.org) is a PHP-based Ajax/XAP object-oriented framework.

  • It uses JSON Messages and native PHP serialized objects to communicate.

  • Special attention has been paid to security.

  • Supports server-side events (Distributed Events [Chapter 10]).

  • Supports client-side events (XOAD Events).

  • Supports server and client extensions.

  • Supports HTML manipulation (extension).

  • Supports caching (extension).

  • Each class, method and variable is documented.

  • Provides easy tutorials to get started using XOAD.

  • Provides examples that demonstrate various functionality.

  • Won the PHP Programming Innovation Award of August of 2005 (http://www.phpclasses.org/winners.html).

  • Open source license (PHP 3.0 license) by Stanimir Angeloff.

Python Ajax Frameworks

CrackAJAX

CrackAJAX is a Python framework (http://www.aminus.org/blogs/index.php/phunt/2005/10/06/subway_s_new_ajax_framework) that does not require JavaScript skills.

  • Open source license by Peter Hunt

Turbo Gears

Turbo Gears (http://turbogears.org) is a “mega-framework” combining many libraries and frameworks.

  • Open source licence (MIT license) and multiple licenses from incorporated frameworks by multiple developers

Ruby Ajax Frameworks

Ruby On Rails

Ruby On Rails (http://www.rubyonrails.org/) is a general web framework with strong Ajax support.

  • Rails was still in its early days when Ajax hype began, so Ajax may become increasingly important to the Rails framework.

  • Generates most or all of the JavaScript for widgets and animation in the browser.

  • Supports calling server side.

  • Provides scheduling support.

  • Open source license [MIT or similar (http://wiki.rubyonrails.com/rails/show/License) by David Heinemeier Hansson and contributors (http://www.loudthinking.com/).

Get Ajax Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.