AJAX

AJAX:

Asynchronous Javascript with XML

AJAX

Pre-AJAX Approach

  1. User clicks link/form
  2. Server gets form and computes a new page to show
  3. Browser displays whole new page

AJAX Goal

  1. Ability to modify the current page and have changes show immediately
  2. Ability to send and receive requests without blocking

Background: Javascript

Javascript and Events

XMLHttpRequest

XMLHTTPRequest Operation

Figure 1 shows the overall flow of control when using XHR
  1. Create XMLHttpRequest object
  2. "open()" to establish the protocol
  3. Set a "callback" procedure (inversion of control)
  4. "send()" to initiate the call to the server
  5. Control immediately returns to the caller of send()
  6. Eventually, server starts to respond
  7. Response is complete
  8. Callback is notified

Example Code

Data Transmission

Asynchronous Server to Client Callbacks

JSON

Summary

AJAX Toolkits

Prototype (48%) Yahoo UI (5%)
Script.aculo.us (33%) Rico (5%)
Dojo (19%) Atlas (4%)
DWR (12%) MochiKit (4%)
Moo.fx (11%) XAjAX (4%)
jQuery (7%) GWT (3%)

Toolkits (cont.)

List of AJAX and Related Toolkits

AJASON ActiveWidgets
AjaxAgent AjaxClientEngine
AjaxToolbox Ajax.NETProfessional
Ajax4jsf AjaxAC
AjaxAnywhere AjaxAspects
AjaxCaller AjaxCFC
AjaxFace AjaxGear
Ajaxium AjaxTags
AJFORM AMFPHP
Anthum.NET ARSCIF
AspectsofAjax Atlas,Microsoft
AXE Backbase
Bindows BitkraftforASP.NET
BorgWorX BZbyteEZAjax
Cajax CakePHP
Catalyst CEITON
CFAjax CGI::Ajax
CL-Ajax Claw
Clientcallbackmanager ComfortASP.NET
CPAINT crossvisionApplicationDesigner
DartPowerWEBLiveControls DataRequestor
Django Dojo
DutchPIPE DWR
eBusinessApplications
(EBA)AjaxComponents
Echo2
emergetk EngineforWebApplications
FastPage FAT:FadeAnythingTechnique
FeatherAjax FlexAjaxBridge
FlexibleAjaxFramework Freja
GoogleWebToolkit Guava
Guise HTML::Prototype
HTML_AJAXPEARPackage HTMLHttpRequest
HTSWaf ICEfaces
InteractiveWebsiteFramework Interface
JackBe JavaWebPartsAjaxParts
Java2ScriptPacemaker Javeline
jMaki JoySpotWorkShopandADL
JPSPAN jQuery
JRP JsLINB
JSMX JSON
JSON-RPC-Java JSPControlsTagLibrary
JsRia JSRS
jWic LibXMLHttpRequest
Light Macao
MagicAjax.NET MAJAX
MochiKit MonoRail
Moo.fx My-BIC
NanoAjax Nevow
Nitro Novulo
OutPost PAJAJ
PAJAX phpAjaxTags
PHPRPC PHPWebBuilder
Pipeline PlexToolkit
Porcupine PowerWEB
Prototype Qcodo
qooxdoo Raju'sGUI-API
Rialto Rico
RSLite RubyonRails
SACK SAJAX
Sarissa Script#
Script.aculo.us Seaside
SimpleJax SmartClient
StratosPHPFramework Stream
Subsys_JsHttpRequest SuperAJAXProgrammingSeed
swato SweetDevRIA
Symfony Tacos
TelerikradControls TheFlashJavaScriptIntegrationKit
ThinkCAPJX ThinWire
thyAPI TIBCOGeneralInterface
TIBET TinyAjax
Toxic,Dotvoid TurboGears
UI4W uniAjax
vcXMLRPC VisualWebGUI
WDDXAJAX WebORBfor.NET
Wicket WidgetServerFramework
WinLIKE Wt
XAJAX XANDRAFramework
XHConn XHRConnection
XOAD xulfaces
Zephyr ZimbraAjaxTK
ZKforJava zumiPage