Thursday, May 21, 2009

Simple AJAX Synchronization Example

There has been a great deal of discussion lately about using eValid to run tests on AJAX applications where the behavior of a test may be affected by how fast the server-side part of an AJAX-based page performs.

These are always complicated scripts, but we came up with a very simple example that seems to make all of the points.

In "MooTools" AJAX Synchronization Example the simple trick we use to illustrate how simple Sync-on-Text synchronization works is to play the script back with all of the natural delays (what was recorded "from life") multiplied by 0.0.

The resulting script "plays ahead" of the AJAX example -- an autocompleter function done with the MooTools kit -- until you add a SyncOnText command. After that, even with the delays all at zero seconds the script plays back fully synchronized.

No comments: