A.2. 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). A.2.1. 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 newcomersinstead 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 A.2.2. 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 A.2.3. 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 toolkitnamely, progress bar, autocomplete, and form validator. Open source license (MIT) by Allan Spartacus Mangune (http://www.allanmangune.com) of ArchCommerce (http://www.archcommerce.com). A.2.4. 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) A.2.5. 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/) A.2.6. 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. A.2.7. 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/) A.2.8. 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 actionse.g., upon server response Open source license (GPL or LGPL) by "Peter F" A.2.9. 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. A simple component released as part of Brent Ashley's more comprehensive Remote Scripting work (see "JavaScript Remote Scripting (JSRS) (from 2000)" in the "Multilanguage Ajax Frameworks" section) Open source license by Brent Ashley A.2.10. 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. A.2.11. 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. A.2.12. 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 |