Javascript Remoting Frameworks - Ajax Patterns

Javascript Remoting Frameworks

From Ajax Patterns

(Difference between revisions)
Revision as of 16:43, 13 September 2008
78.160.226.3 (Talk | contribs)
look me
← Previous diff
Current revision
Mahemoff (Talk | contribs)

Line 278: Line 278:
* Caller can specifies callback function or callback DOM object. With a callback DOM, the response text is pushed directly into the DOM. * Caller can specifies callback function or callback DOM object. With a callback DOM, the response text is pushed directly into the DOM.
* Open source (modified MIT license) by Gregory Wild-Smith. * Open source (modified MIT license) by Gregory Wild-Smith.
 +
 += SOAPjr - a hybrid of SOAP and JSON-RPC (December 2008) =
 +'''[http://SOAPjr.org SOAPjr] is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks. It is a hybrid of SOAP and JR (JSON-RPC). '''
 +* An Open Source project that currently provides javascript libs, a jQuery plugin and Perl modules, however it can easily be implemented in any network aware programming language.
 +* SOAPjr is designed to create clean, fast, AJAX-style API's and is analogous to the introduction of out of band signalling in the telephony world.
 +* Draft proposal, demonstration, tools and json-schema's are available on the [http://SOAPjr.org SOAPjr website]
= Subsys_JsHttpRequest = = Subsys_JsHttpRequest =
Line 306: Line 312:
</pre> </pre>
* Open-source (Creative Commons Attribution-ShareAlike License). By Brad Fults. * Open-source (Creative Commons Attribution-ShareAlike License). By Brad Fults.
- 
-= look me = 
- 
-[http://www.evdenevenakliyatt.biz evden eve nakliyat] 
-[http://www.evdenevenakliyatt.org evden eve nakliyat] 
-[http://www.cerkezkoynakliyat.com evden eve nakliyat] 
-[http://istanbul.ankara-nakliyat-firmalari.com evden eve nakliyat] 
-[http://www.ensekeroyunlar.com oyunlar] 

Current revision

See also Javascript_Multipurpose_Frameworks and Ajax_Frameworks.

Contents

AJAX Queue Class (from May 2007)

AJAX Queue Class is a very robust and simple-to-use JavaScript class that wraps the XMLHTTPRequest, and queues requests in order to ensure that they all complete. It also provides a very simple interface to basic AJAX.

This is not a full AJAX framework. Rather, it is the most fundamental component of AJAX; the "driver" for the requests. The idea is to abstract the XMLHTTPRequest to a level at which it is just never even a consideration.

This works on every browser that supports AJAX, including IE5/Win98, Opera 8+, Safari 1.2+, etc.

Completely Open and Public.

By Chris Marshall.

AjaxCaller (from May 2005)

AjaxCaller is a basic threadsafe wrapper around XMLHttpRequest mainly for Ajax newcomers, still beta and under development, only packaged with the AjaxPatterns demos right now. See TestAjaxCaller.

  • 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.
  • Creative Commons license. By Michael Mahemoff with some ideas from John Wehr and Richard Schwartz.

AjaxGear (from November 2005)

AjaxGear 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 website is available for download to see AjaxGear in action.
  • Use the AjaxGear.PageEngine.js file to learn how a website can easily use the toolkit.
  • Example code:
function display(page, contentID)
{
    var obj = document.getElementById(contentID);
    var ajax = new AjaxGear.Ajax();
    ajax.setMethod("Get");
    ajax.setPagePath(page);
    ajax.startRequest();
    ajax.onRequestComplete = function(){   
        obj.innerHTML = ajax.getResponseText();
    }
}

Ajax Client Engine (From December 2005)

Ajax Client Engine is a powerful remoting wrapper.

  • Object-oriented API.
  • Cross-browser support
  • Flexible:
    • Request option
    • Request parameter validation
    • Callback argument
    • Callback option
    • Callback timeout
    • Tracing service
    • Caching service
    • Polling service
    • Common callbacks
    • Exception handling
  • Open-Source (MIT License) by Li Shen.

Ajax Toolbox

Ajax Toolbox is an easy to use wrapper around the XMLHttpRequest object with some useful additional capabilities.

  • Remote Asynchronous calls to the server, with custom error handling and timeout capability.
  • Making and tracking multiple asynchronous calls to the server.
  • Event handling. Eg Signals completed task.
  • Submitting forms.
  • Queing calls.
  • Passing parameters to the server.

AJFORM (Since June 2005)

AJFORM" AJFORM is an extremely easy to use AJAX framework. It is designed to be for entry level AJAX coders. It's single purpose is to send data from any HTML form via XMLHTTP.

The AJFORM Framework provides you with:

  • 3 Step setup
  • Automatic support for any HTML form
  • Ability to implement with little coding knowledge
  • Open-Source (BSD License)

Dervish

Dervish is a small open source framework that allows you to execute JavaScript server side code by calling JavaScript functions in the browser.

It completely hides all AJAX request handling behind an easy-to-use interface. In other words, Dervish is a way to do Remote Method Invocation (RMI) in JavaScript.

Dervish requires JSSP (JavaScript Server Pages) to run on the server. JSSP enables you to generate content on Java web servers using JavaScript.

JSSP also supports embedded SQL statements in JavaScript code. The following example illustrates the usage of Dervish on JSSP:

<%
// server side JavaScript code
function CustomerLoader() {
    this.load = function(id) {
        var stmt = connection.SELECT * FROM Customers WHERE ID = ?id?;
        stmt.id = id;
        var rset = stmt.run();
        if (!rset.next()) return null;  // nothing found
        return rset.wrap({});           // wrap the row into an empty object
    }
}
Dervish.publish("CustomerLoader", new CustomerLoader());
%>

This is how to use it from the client:

<script>
var customerLoader = Dervish.getObject("CustomerLoader");
var customer0 = customerLoader.load(0);
if (customer0 != null) {
    // do something
}
</script>

HTMLHttpRequest (Beta; from 2005)

HtmlHttpRequest uses XMLHttpRequest and IFrames as well for improved compatibility.

  • Tested and Works: IE6/Win, IE5.5/Win, IE5/Win, IE4/Win, Mozilla/Win, Opera7/Win, Safari/Mac, IE5/Mac.
  • Untested, Probably Works: IE4/Mac, Mozilla/Mac, Opera/Other, Konqueror/Linux. Are you using one of these? The author is requesting compatibility info.
  • Open source license (LGPL). By Angus Turnbull of Twin Helix Designs.

Javeline TelePort (evolved from vcXMLRPC, from Aug 2000)

TelePort is Javeline TelePort is an Open Source server communication layer supporting all popular web services such as XML-RPC, SOAP, JSON, REST and Comet. Javeline TelePort is an Open Source server communication layer supporting all popular web services. By using it, developers can elegantly implement asynchronous communication as part of their AJAX projects. It has robust error, time-out and retry handling. TelePort features an advanced polling interface for controlling reconnecting and the polling frequency, and has advanced debugging features. Currently Javeline TelePort has built-in support for XML-RPC, SOAP, JSON, REST, Comet and Javeline FrameWork-specific protocols. TelePort is released under the Open Source GPL license so support for other protocols can easily be added.

Supported Protocols

Features

  • Modulair protocol support
  • Robust polling engine
  • Elegant error handling
  • Elegant time-out handling
  • Automatic retry
  • Comet server component included
  • JPHP server component included
  • Realtime communication trace for easy debugging

Benefits

  • Interchangeability between protocols
  • Highly Scalable
  • Build for reliability
  • Stable communication foundation
  • Tested in real-world applications
  • Evolved from the 2000 vcXMLRPC library

For documentation and the source code visit the project page at SourceForge.net, or the developer center at Javeline.org.

Project page:

Live demos:

Documentation:

More information:

Juice Lib (from April 2007)

Juice Lib is a simple javascript library providing an useful set of functions and object that will enhance web user interface development. What features it provides ?

  • Text manipulation and string buffers.
  • Map, Reduce and Filter for array data processing.
  • Associative arrays utilities.
  • Simple log system.
  • onload and keyboard event handlers.
  • HTTPXMLRequest processing (simple request and scheduler).

Apache 2.0 License.

By Miguel Galves.

jx / jxs (from Jan 2006)

jx is a small toolkit for providing AJAX support in JavaScript. It has two different version - jx and jxs.

jx

jx provides the most basic Ajax support. It is striped down to minimize file size - so it will not support many advanced features. You can pass data to the server side script using the [GET] method only. The supported return types are plain text and [JSON].

  • Supports JSON.
  • Small Size (1.2 KB compressed / 2.6 KB with all the comments)
  • Easy to use.

jx 3.00.A


jxs

jxs a slightly larger version of jx - hence the name j excess. It supports many features that the lite version don't support. The file size is slightly bigger - but its worth it.

  • Supports both POST and GET methods
  • Supports XML return.
  • Supports customizable loading indicator display
  • Automatically update a given element with returned text.
  • Size - Complete file is 5.6 KB and Compressed Source File is 2.9 KB
  • Customizable onReadyStateChange handler
  • And more...

jxs - V2.01.A

Sample Code

jx.load('demo.php?dummy=text&lorem=ipsum',function(data){
	alert(data); // Do what you want with the 'data' variable.
	//Data is the content that was returned by the server side script - in this case 'demo.php'
});

Information

JSMX (from Aug 2005)

JSMX This 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 Vs. 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 (Creative Commons Attribution-ShareAlike License). By Todd Kingham.

LibXMLHttpRequest (Released; June 2003)

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


Lokris (Released: September 2006)

Lokris is a lightweight XMLHttpRequest wrapper. Remarkable: user can set timeout limit and timeout handler.

  • Small footprint (minimized ~ 3K)
  • Synchronous/Asynchronous cross-browser Ajax calls (of course)
  • Convenience features for easy XmlHttpRequest handling
  • Handling of plain text and XML data
  • Setting timeouts for Ajax calls / Setting timeout handlers
  • Setting error handlers for Ajax Calls
  • Easy to understand, no blown up code, no overhead
  • BSD-style licence

MAJAX (Released; August 2005)

MAJAX is yet another VERY thin wrapper for HttpRequest, 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.

RSLite (x)

RSLite is a thin wrapper around a highly cross-browser compatible transport layer comprised of a javascript image object request with 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 in Multi-Language Server-Side section).
  • Open-source license by Brent Ashley.

Sack (from May 2005)

Sack is a thin wrapper around XMLHttpRequest.

  • Caller can specifies callback function or callback DOM object. With a callback DOM, the response text is pushed directly into the DOM.
  • Open source (modified MIT license) by Gregory Wild-Smith.

SOAPjr - a hybrid of SOAP and JSON-RPC (December 2008)

SOAPjr is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks. It is a hybrid of SOAP and JR (JSON-RPC).

  • An Open Source project that currently provides javascript libs, a jQuery plugin and Perl modules, however it can easily be implemented in any network aware programming language.
  • SOAPjr is designed to create clean, fast, AJAX-style API's and is analogous to the introduction of out of band signalling in the telephony world.
  • Draft proposal, demonstration, tools and json-schema's are available on the SOAPjr website

Subsys_JsHttpRequest

Subsys_JsHttpRequest - Russian Ajax framework with XmlHttpRequest support and dynamic "script src" generation to emulate Ajax functionality for old browsers, which not compatable with XmlHttpRequest.

UniAjax (Released: July 2006)

UniAjax is a framework to make hidden HTTP requests for Ajax scripting. It's supported by all current browsers, tested up to now with IE 5.5+, Firebird 0.7+, Firefox 1+, Netscape 7+, Opera 7+.

  • It provides basic functionality for client and server side by using an easy syntax.
  • Makes requests via XMLHTTPRequest and Iframes (as workaround for old browsers), works with GET or POST. Takes care of encoding.
  • Cross-domain
  • Responses via JSON, XML or normal string
  • General Public License. By Andreas Kalsch

vcXMLRPC (Released Aug 2000)

vcXMLRPC is a way of communicating over the internet. It is an agreement on sending structured data(e.g. Arrays, Structs, strings) encoded in XML to a Server. An XML-RPC Message is received back as a response which also contains structured data.

vcXMLRPC is arguably the first Open Source XML-RPC library. It was released in August 2000. It is no longer in active development, but has evolved into Javeline TelePort, part of Javeline FrameWork.

XHConn (Released; from April, 2005)

XHConn is a thin wrapper around XMLHttpRequest.

  • Example:
new XHConn().connect("mypage.php", "POST", "foo=bar&baz=qux", fnWhenDone);
  • Open-source (Creative Commons Attribution-ShareAlike License). By Brad Fults.