Ajax at HBS David Lieberman Application Software Architect Educational Technologies Group Harvard Business School [email protected]

Why bother? • Performance gain? • Simpler code? • Better, more intuitive UI • Rising user expectations!

What does AJAX mean, anyway?

• Asynchronous JavaScript And XML

What does AJAX mean, anyway?

• Asynchronous JavaScript And XML

What does AJAX mean, anyway?

• Asynchronous JavaScript And XML • Just plain “Ajax,” thank you.

My Goals for Ajax • Take the protocol out of the equation

My Goals for Ajax • Take the protocol out of the equation – Put data exchange in the foreground

My Goals for Ajax • Take the protocol out of the equation – Put data exchange in the foreground – If I have to write request.getParameter(“…”) I’m not interested …

My Goals for Ajax • Take the protocol out of the equation – Put data exchange in the foreground – If I have to write request.getParameter(“…”) I’m not interested … • So: XML in, XML out

My Goals for Ajax • Take the protocol out of the equation – Put data exchange in the foreground – If I have to write request.getParameter(“…”) I’m not interested … • So: XML in, XML out • Show me the framework! – Struts?

XMLHttpRequest properties • responseText [String] Raw response text

• responseXML [XML Object] If response text is well-formed XML

• readyState [Integer] • status [Integer = the HttpResponse code]

XMLHttpRequest methods • open([String] method, [String] url, [boolean] asynchronous) • send([String] arg)

XMLHttpRequest event • onReadyStateChange

XMLHttpRequest Set up method variables function get(url, callback) { var ajaxrequest; var ajaxresponse; . . . }

XMLHttpRequest Bind the request callback method function get(url, callback) { . . . function bindRequestChange() { if (ajaxrequest.readyState == 4) { if (ajaxrequest.status == 200) { ajaxresult = ajaxrequest.responseXML; eval(callback + "(ajaxresult)"); } else { alert("There was a problem retrieving the XML data: \n" + ajaxresult.statusText); } } } }

XMLHttpRequest Instantiate the XMLHttpRequest object function get { . . . if (window.XMLHttpRequest) { ajaxrequest = new XMLHttpRequest(); } else if (window.ActiveXObject) { ajaxrequest = new ActiveXObject("Microsoft.XMLHTTP"); } if (ajaxrequest) { ajaxrequest.onreadystatechange = bindRequestChange; ajaxrequest.open("GET", url, true); ajaxrequest.send(null); } }

Three Implementations at HBS • Application Access Admin • Tutorial Platform Authoring • Videotools Portal Admin • Controlled environments with small user communities

Application Access Admin • Utility for controlling access to applications or application modules based on group membership • Ajax feature: – Auto-populating roles selector

Tutorials Platform Authoring • Tutorials Platform: exposes Flash content to end-users delivered via XML (Ajax competitor alert!) • Authoring environment: assembling these tutorials element-by-element • Ajax features: – Metadata – Tree sorting – Rich text editor

Gotchas • Support! • Google we are not. • The Javascript DOM API: more like JAXP than JDOM (cf JDOM + JXPath) • Safari!

Videotools Portal Admin • Portal: a stylized, sorted collection of video assets targeted to a specific user community • Admin requires: sorting, labeling, refreshing, creating RSS feeds. • Out with XML, in with JSON!

Coming (maybe) to a browser near you … • Ajax Push – AKA “Reverse Ajax” – AKA “Comet”

JavaScript Libraries • Scriptaculous http://script.aculo.us/

• Prototype http://prototype.conio.net/

• Yahoo! UI Library http://developer.yahoo.com/yui/

• Zimbra Toolkit http://www.zimbra.com/community/ajaxtk_download.html

• Dojo http://dojotoolkit.org/ • DWR http://getahead.org/dwr/getstarted

Other Resources • http://www.jdom.org • http://jakarta.apache.org/commons/jxpath/ • http://www.json.org • http://www.ajaxian.com

Ajax at HBS

Application Software Architect. Educational Technologies ... Harvard Business School ... ajaxrequest = new ActiveXObject("Microsoft. ... small user communities ...

211KB Sizes 1 Downloads 214 Views

Recommend Documents

HBS-AirAsia-FlyingLowCostwithHighHopes-CaseStudy.pdf ...
mobile phone through Short Messaging Service in August 2003. Domestic and Short-Haul Regional Services. In addition to its primary hub at the KLIA, AirAsia ...

hbs-watermark.pdf
+ÉÉÉÊlÉÇBÉE oÉÎK] oÉä BÉEàÉ oÉÖÉÊ ́ÉvÉÉ |ÉÉ{iÉ ́ÉMÉÇ BÉäE ãÉÉäMÉÉå BÉEÉä =kÉàÉ o ́ÉÉolaÉ oÉä ́ÉÉAÆ ={ÉãɤvÉ BÉE®ÉxÉä, ́ÉÉÊ®K~ ... 7. càÉÉ®ä |ÉvÉÉxÉàÉÆjÉÉÒ gÉÉÒ xÉ

Aranea Ajax
more and more similar to desktop applications in terms of features and qualities. ... Aranea's JavaScript API and synchronization filter service. The contributions are ...... http://msdn2.microsoft.com/en-us/library/ms537505.aspx. (28.05.2007).

Professional Ajax
been organized into a handful of design patterns that describe best practices for Ajax .... As the Web evolved, businesses soon saw potential in the ability to distribute ...... broadband Internet solutions, many sites have upgraded, including ...

javascript & ajax accessibility
Web Accessibility Architect. IBM Emerging .... Replace data where possible rather than creating and adding new elements to the page. Not all AT can handle ...

Agnostic AJAX (1)
Agnostic AJAX: Asynchronous JavaScript and Data ... Need not use XML as data format for AJAX updates .... Calls display function to convert data to HTML table.

HBS-Results-Tanzania_1.pdf
19 Nyawilimilwa/Center Japhet Donald Lushiku. 20 Ujamaa Phoebe Malae ... GEITA. Page 3 of 11. Main menu. Displaying HBS-Results-Tanzania_1.pdf.

HBS-Results-Tanzania_1.pdf
18 Malicela John Simmons Hina. 19 Mlimani Henry Joel Chigalika. 20 Isusumya + Uganda Getruda F.Magessa. 21 Namle Mursal Abdallah Mashaka. SN AREA ...

AJAX and PHP - Navodaya Foundation
modern web browser, such as Internet Explorer, Mozilla Firefox, Opera, or Safari. • Web applications make ... Although the history of the Internet is a bit longer, 1991 is the year when HyperText Transfer. Protocol (HTTP) ... the location bar of Fi

pdf ajax tutorial
File: Pdf ajax tutorial. Download now. Click here if your download doesn't start automatically. Page 1 of 1. pdf ajax tutorial. pdf ajax tutorial. Open. Extract.

asp net ajax tutorial pdf
Page 1 of 1. File: Asp net ajax tutorial pdf. Download now. Click here if your download doesn't start automatically. Page 1 of 1. asp net ajax tutorial pdf. asp net ...

HBS Citation Guide Source- www.hbs.edu.pdf
HBS Citation Guide Source- www.hbs.edu.pdf. HBS Citation Guide Source- www.hbs.edu.pdf. Open. Extract. Open with. Sign In. Main menu.

ajax toolkit tutorial pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. ajax toolkit ...

Modeling AJAX Application Performance
Parallel HTML and AJAX applications. • 5 users each performed ... Two systems did not implement same user interface ... Client loads HTML common elements.

ajax toolkit tutorial pdf
ajax toolkit tutorial pdf. ajax toolkit tutorial pdf. Open. Extract. Open with. Sign In. Main menu. Displaying ajax toolkit tutorial pdf.

Modeling AJAX Application Performance
... did not implement same user interface. • Large savings from use of long link ... Implemented with Sarissa open-source library. – AJAX code size 57K bytes ...

asp net ajax tutorial pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. asp net ajax ...

Modeling AJAX Application Performance
Appear faster than server-based. • Use local processing. – Pre-fetch info (e.g. GoogleMaps). – Process data on client. (e.g. sorting, forms-checking, etc). How do ...

HBS - V. Kasturi Rangan - The Freeport Mine, Irian Jaya ...
HBS - V. Kasturi Rangan - The Freeport Mine, Irian Jaya, Indonesia_Tailings & Failings-Stakeholder Analysis.pdf. HBS - V. Kasturi Rangan - The Freeport Mine, ...

Recording and Replaying Navigations on AJAX Web ...
Navigations on AJAX Web Sites. Alberto Bartoli. Eric Medvet ... Web macros. □ Reverse engineering. □ … ... Session-based element id. □ Elements without id ...