The last year has seen a rapid proliferation of Ajax and JavaScript frameworks, from small cross-browser wrapper utilities to complete end-to-end client and server solutions. In this appendix, we attempt to take a snapshot of the current range of offerings, with apologies to any that we’ve omitted.
We, the authors of this book, haven’t personally used all of these frameworks and toolkits in a production setting, and in many cases we’ve based our descriptions on the author or vendor’s own claims for the toolkit. If you’re reading this a year after publication, many of the descriptions will be wildly inaccurate or out of date, and many of the frameworks may have been abandoned or absorbed into other projects. The current state of play is unstable, in our opinions, and we would expect a few successful frameworks to predominate over the next 12 months.
So here, without any further ado, is our roundup of Ajax frameworks that you might encounter in the wild. We haven’t attempted to categorize them beyond listing them alphabetically. Happy coding!
Open source
Adds accesskey underlining to pages without requiring <u> tags in the source. Tag items with the accesskey attribute and JavaScript will create the appropriate underlining tags in the DOM.
Commercial with free download
Rich client JavaScript widgets; current flagship product is a rich grid widget.
Open source (Apache)
http://smirnov.org.ru/en/ajax-jsf.html
The Ajax-JSF framework is designed to allow simple conversion of any existing JavaServer Faces application to Ajax functionality. Most of the existing components can be used as is or simply converted to Ajax support. Proposal to MyFaces project. Minimal differences from JSF specifications.
Open source
http://ajaxtags.sourceforge.net/
The Ajax JSP Tag Library is a set of JSP tags that simplify the use of Asynchronous JavaScript and XML (Ajax) technology in JavaServer Pages. This tag library eases development by not forcing J2EE developers to write the necessary JavaScript to implement an Ajax-capable web form.
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 popup balloon, anchored to an HTML element with an onclick event. Select populates a second select field based on a selection within a drop-down field. 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 the response to text entered in another field.
Michael Schwarz (2005)
Unspecified, free to use
http://weblogs.asp.net/mschwarz/
Ajax.NET is a library enabling various kinds of access from JavaScript to server-side .NET. Can pass calls from JavaScript into .NET methods and back out to JavaScript callbacks. Can access session data from JavaScript. Caches results. No source code change needed on server side; mark methods to expose with an attribute. Provides full class support for return values on client-side JavaScript, including DataTable, DataSet, DataView, Arrays, and Collections.
Open source (Apache 2.0)
AjaxAC encapsulates the entire application in a single PHP class. All application code is self-contained in a single class (plus any additional JavaScript libraries). The calling PHP file/HTML page is very clean. You simply create the application class, then reference the application JavaScript and attach any required HTML elements to the application. No messy JavaScript code clogging up the calling HTML code; all events are dynamically attached. Easy to integrate with templating engine, and to hook into existing PHP classes or MySQL database for returning data from subrequests. Extensible widget structure lets you easily create further JavaScript objects (this needs a bit of work, though, according to the author).
Free to use with source
http://ajaxaspects.blogspot.com
AjaxAspects is an engine that uses JavaScript proxies to call server-side Web Service methods. Standard SOAP and WSDL is reused for the communication between client and server. Simple types and XML objects are supported as parameters and return values. Supports caching and queuing of actions.
Michael Mahemoff (2005)
Open source
http://ajaxify.com/run/testAjaxCaller
AjaxCaller is a basic thread-safe wrapper around XMLHttpRequest mainly for Ajax newcomers; still raw alpha and under development and is only packaged with the AjaxPatterns live search demo for now. Follows REST principles.
Open source (ASF)
Apache’s JavaServer Faces implementation; currently experimenting with Ajax support.
Commercial with community edition
BackBase is a comprehensive browser-side framework with support for rich browser functionality as well as .NET and Java integration. BackBase provides Rich Internet Application (RIA) software that radically improves the usability and effectiveness of online applications, and increases developer productivity. With BackBase you can build web applications with a richer and more responsive user interface. BackBase provides separation of presentation from logic through a custom XHTML namespace.
Ben Nolan (2005)
Open source
Behaviour works by using CSS selectors to add JavaScript code to DOM elements. You create a hash of CSS selectors and functions that take an element, and add JavaScript event handlers such as onclick. You then register these rules against a page and compare them against their matching DOM elements, and the JavaScript code is added. The code is designed in a way that you can treat these rule files just like stylesheets so that all the page using them needs is an include. Behaviour’s goal is to remove the heavy use of onclick attributes and script nodes from pages so they aren’t messing up content. It works well and can help make your JavaScript more reusable since it’s more centralized.
Commercial
Bindows 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’s side; only a browser is required (no Java, Flash, or ActiveX is used). Bindows provides a range of widgets, as well as native XML, SOAP, and XML-RPC support.
Commercial with free version
Rich component suite, including a WYSIWYG text editor and spreadsheet widget.
Open source
A comprehensive port of Ruby on Rails to PHP, including top-notch support for Ajax.
Richard Newman (2005)
Open source
CL-Ajax directs JavaScript calls directly into server-side Lisp functions. Generates JavaScript stub with arguments. Can call back to JavaScript functions or DOM objects. May be integrated into SAJAX.
Pre-release commercial with free download
www.daniel-zeiss.de/ComfortASP/
ComfortASP.NET is an approach that lets developers rely on pure ASP.NET programming while offering Ajax-like features. ComfortASP.NET uses Ajax (DHTML, JavaScript, XMLHTTP) to implement these features, but the web developer only implements pure server-side ASP.NET.
Open source with commercial support
www.dynarch.com/projects/calendar/
Configurable JavaScript calendar widget; can be wired up to form fields as a drop-down or pop-up, and styled using CSS.
Open source (GPL and LGPL)
CPAINT is a true Ajax implementation and 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 back-end, while the returned data is manipulated, formatted, and displayed on the front-end in JavaScript. This allows you to build web applications that can provide near real-time feedback to the user.
Alex Russell (2004)
Open source
Dojo provides several libraries for use with Ajax, including widgets, an event model, and messaging using XMLHttpRequest and other techniques. Aims to support JavaScript in a range of settings, including SVG and Netscape’s Java-based Rhino engine, as well as in the web browser.
Open source (Apache)
Direct Web Remoting is a framework for calling Java methods directly from JavaScript code. Like SAJAX, it can pass calls from JavaScript into Java methods and back out to JavaScript callbacks. It can be used with any web framework—such as Struts or Tapestry—following a Spring-like KISS/POJO/orthogonality philosophy. Direct Web Remoting is due to be incorporated into the next release of the Open-Symphony WebWorks framework.
Open source (MPL or GPL)
www.nextapp.com/products/echo2
Echo 2 allows you to code Ajax apps in pure Java. Automatically generates HTML and JavaScript, and coordinates messages between the browser and the server. Offers messaging in XML. The developer can handwrite custom JavaScript components if desired.
Open source
The f(m) project is an ECMAScript Base Class Library, based on the .NET Framework, that was written to serve as the foundation for a new breed of browser-based web applications.
Open source
Rich WYSIWYG editor widget; can be swapped in for an HTML textarea in one line of JavaScript code, allowing easy integration with existing web applications, CMS, wikis, and so forth. Very similar functionality to TinyMCE.
Open source
www.osflash.org/doku.php?id=flashjs
The Flash JavaScript Integration Kit 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 (BSD)
http://goog-ajaxslt.sourceforge.net
AjaxSLT is offered by the innovative search solutions company that refers to itself as “Google.” Google AjaxSLT is a JavaScript framework for performing XSLT transformations as well as XPath queries. Builds on Google Map work.
Commercial with free downloads
Java-based server-side component model (similar in some ways to JSF, but simpler). Currently integrates Ajax functionality for greater responsiveness.
Angus Turnbull (2005)
Open source (LGPL)
www.twinhelix.com/JavaScript/htmlhttprequest/
Simple remote scripting wrapper. Uses XMLHttpRequest and IFrames as well for improved compatibility.
Open source
http://sourceforge.net/projects/iwf/
Interactive Website Framework is a project whose aim is 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. Contains essentially all the plumbing for making Ajax-based websites, as well as other common scripts. Provides a thread-safe XMLHttpRequest implementation and a wrapper around the DOM, making for more readable code.
Commercial
www.jackbe.com/solutions/development.html
Ajax rich client widget suite; can be plugged into any middleware technology such as ASP, Java, .NET, or PHP.
Open source (PHP)
http://jpspan.sourceforge.net/wiki/doku.php
JPSpan passes JavaScript calls directly to PHP functions. Heavily unit-tested.
Open source (LGPL)
Set of open source JavaScript libraries, including cryptography, serialization and deserialization, XML-RPC, and JSON-RPC.
Open source; most implementations are LGPL
JSON is a “fat-free XML alternative” and JSON-RPC is a remote procedure protocol, akin to XML-RPC, with strong support for JavaScript clients. Implementations exist for several server-side languages and platforms, including Java, Python, Ruby, and Perl.
Brent Ashley (2000)
Open source
www.ashleyit.com/rs/jsrs/test.htm
JSRS routes calls directly from JavaScript into your server-side language and back out again. Known browsers: IE 4+, Netscape 4.x, Netscape 6.x, Mozilla, Opera 7, and Galeon. Server-side support: ASP, ColdFusion, PerlCGI, PHP, Python, and JSP (servlet).
Stephen W. Coate (2003)
Source available, protected by copyright
www.whitefrost.com/servlet/connector?file=reference/2003/06/17/libXmlRequest.html
LibXMLHttpRequest is a thin wrapper around XMLHttpRequest.
Open source (MIT)
Mochikit is a set of libraries whose highlights include logging, visual effects, asynchronous task management, string and date/time formatting, and a “painless” DOM manipulation API that makes heavy use of JavaScript’s built-in Array objects and JSON-like notation to represent the DOM.
Open source
Complete DHTML desktop/windowing environment inside the browser. Code is purely standards-based, with no browser hacks. Contains a “signals and slots” messaging implementation, modeled after Trolltech’s Qt widgets and the Smalltalk language; also available as a standalone library.
Commercial
JavaScript widget suite; includes fully functional rich e-mail client. Now part of Yahoo!.
Bill Scott, Darren James (2005)
Open source
A multipurpose framework with support for Ajax. Covers user interface issues such as animations, separation of content from logic through behaviors, drag and drop, and some prebuilt widgets, notably a data grid. Sponsored by Sabre Airline Solutions; has seen real-world use. Built on top of Prototype.
Open source
http://pragmaticobjects.com/products.html
Pragmatic Objects’ WebControls is a set of JSP tag libraries designed as reusable controls or components to enrich Java-based web applications. As opposed to rich but fat web applications, a thin client web application, at the end of the day, consists of nothing but a series of HTML pages, containing JavaScript and CSS codes that are rendered by the browsers. Current offerings consist of an “outlook bar,” a tree widget, and a control panel.
Sam Stephenson (2004)
Open source
Prototype is a JavaScript framework designed for RIA development. It includes a solid Ajax library and a toolkit to simplify use. Prototype is the JavaScript engine for Ruby on Rails, Rico, and Scriptaculous, among others. Prototype’s JavaScript code is generated from Ruby, but the generated JavaScript may be deployed in non-Ruby environments.
Open source (LGPL)
http://qooxdoo.sourceforge.net
This is an Ajax user interface library with a large range of prebuilt components and a well-thought-out design. Includes widgets, layout managers, and portable PNG transparency. Also provides development support such as timers for profiling and debugger support.
Brent Ashley (pre-2000)
A simple component released as part of Brent Ashley’s more comprehensive Remote Scripting work (see the JSRS entry earlier in this appendix).
David Heinemeier Hansson (2004)
Open source (MIT)
Ruby on Rails is a general web framework with strong Ajax support. Rails was still in its early days when the Ajax hype began, so Ajax may become increasingly core to the Rails framework. Generates most if not all of the JavaScript for widgets and animation in the browser. Support for calling server-side. Scheduling support. Current darling of the fashionable web development crowd, Ruby on Rails eschews the complex overdesigned, cover-all-bases strategy in favor of a straightforward, getting-the-job-done approach, with the help of a good deal of code generation. Has won over many Java developers for that reason. Our interest in Ruby on Rails for the purposes of this book is primarily its very good support for Ajax. Prototype, and most recently Scriptaculous, have been integrated into Rails.
Open source (modified MIT/X11)
http://twilightuniverse.com/2005/05/sack-of-ajax
Sack is a thin wrapper around XMLHttpRequest. The caller can specify a callback function or a callback DOM object. With a callback DOM, the response text is pushed directly into the DOM.
Open source
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(). Facilitates mapping from a JavaScript stub function to a back-end operation. Capable of stubbing calls to numerous server-side platforms: ASP, ColdFusion, Io, Lua, Perl, PHP, Python, and Ruby.
Open source (GPL and LGPL)
Sarissa is a JavaScript API that encapsulates XML functionality in browser-independent calls. Supports a variety of XML technologies, including XPath queries, XSLT, and serialization of JavaScript objects to XML, in a browser-neutral way.
Thomas Fuchs (2004)
Open source
Scriptaculous is a well-documented visual effects library built in JavaScript on top of Prototype. It includes demos, sample applications, and a drag-and-drop library.
Open source (ASF)
SWATO (Shift Web Application TO...) 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 the Ajax way. The server-side Java library can be easily deployed in all Servlet 2.3+ compatible containers. The client-side JavaScript library can be worked in various browsers, as long as XMLHttpRequest is supported. SWATO uses JSON to marshal the data of your POJOs on the server side, so that you can access the remote data in any JavaScript environment (HTML, XUL, SVG) easily by either hard-coding or by integrating with mature JavaScript libraries. Comes with several reusable components (Auto-complete Textbox, Live Form, Live List, etc.) that help you develop your web apps rapidly.
Commercial
Tibet aims to provide a highly portable and comprehensive JavaScript API, so that a great amount of client-side code is possible. Pitches itself as “Enterprise Ajax.” Supports web service standards such as SOAP and XML-RPC, with prebuilt support for some popular web services such as Google, Amazon, and Jabber instant messaging. Includes an IDE written in JavaScript using the Tibet toolkit.
Open source, with commercial backing and some proprietary plug-ins
Rich WYSIWYG editor widget; can be swapped in for an HTML textarea in one line of JavaScript code, allowing easy integration with existing web applications, CMS, wikis, etc. Very similar functionality to FCKEditor.
Open source
http://trimpath.com/project/wiki/JavaScriptTemplates
JavaScript template engine for splicing together data and presentation on the browser.
Open source
DHTML libraries for drag-and-drop support, and for vector graphics drawing of lines and curves by using DIV elements as pixels.
Commercial with free edition
www.themidnightcoders.com/weborb/aboutWeborb.htm
WebORB for .NET is a platform for developing Ajax and Flash-based rich client application and connecting them with .NET objects and XML web services.
Commercial with community/free edition
www.themidnightcoders.com/weborb/aboutWeborb.htm
WebORB for Java is a platform for developing Ajax and Flash-based rich client application and connecting them with Java objects and XML web services. Includes a client-side library called Rich Client System (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 Java object, XML web service, or Enterprise JavaBean. Provides a special API for handling database query results; the 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.
Mike Foster (2005)
Open source
Veteran DHTML library, providing cross-browser support for animation, styling, events, and other common functionality.
J. Max Wilson (2005)
Open source
XAJAX passes JavaScript calls directly to PHP functions. Use a JavaScript stub to call a PHP script.
Open source (GPL)
This project comprises a library for developing thin client application front-ends using a browser. It helps developers to create GUI application interfaces for Internet, intranet, and extranet applications. x-Desktop features include the fact that it is browser based and that no plug-ins are required. It supports all operating systems that provide a DOM 2/JavaScript capable browser; offers a simple, well-documented object interface; and provides a customizable desktop and window skins.
Brad Fults (2005)
http://xkr.us/code/JavaScript/XHConn
XHConn is a thin wrapper around XMLHttpRequest.
13.59.123.182