// generic script must be in a container tag to work everywhere
chw.ariadne.mobi
Full Support: Async I/O with AJAX

All the Bells-and-Whistles: Anonymous Objects & Prototyping

Demonstration

Request counter: 0

Watch how the request counter above rises as each request goes out and falls as each response rolls back in. If you click rapidly on one or more vote links, then you will see it more clearly. If the request counter never goes over "1", then your Web browser does not support this more advanced level of JavaScript/ECMAScript.

Explanation

Separation of Concerns

Discuss separating the generic from the page-specific code, to make reusable AJAX prototypes.

Using Prototypes

Discuss creating a new HttpClient object from the prototype of one in HttpClient.js.

Anonymous Objects

Discuss using scope of variable client and depending upon garbage collection to cut down on book-keeping code-clutter.


Code

Viewing Code

Creating Prototypes

Content

HttpClient Prototype Walkthrough

Move this to a different page-chunk?