AJAX Support...

Applying eValid to AJAX applications that require advanced DOM-based methods.

AJAX Support...

Postby limcom » Mon Jan 25, 2010 5:09 pm

Why can't we synchroniz our AJAX test playback on JavaScript events? Don't they always work reliably?
limcom
 
Posts: 6
Joined: Mon Jun 29, 2009 10:58 pm

Re: AJAX Support...

Postby eValid » Thu Jan 28, 2010 2:12 pm

limcom wrote:Why can't we synchronize our AJAX test playback on JavaScript events? Don't they always work reliably?

The JavaScript engine that is running in the browser is "single threaded" -- this is a constraint imposed by security concerns, for if the JavaScript engine could run multiple threads there would be a big security hole available for malware to interfer with normal browser operations.

That the JavaScript engine is single threaded usually doesn't bother things too much...just as long as all of the tasks get done it's OK to have them done serially.

But if you try to tell the JavaScript engine to wait for a specific state change in the current page's DOM, you get into a "deadly embrace" situation whereby your loop that is testing for a specific value interfers with the JavaScript process that is causing the state change. One process blocks the other until the synchronization logic "times out"...but that's not very effective because it is just like a wait step. As we all know, synchronizing AJAX tests based on waiting fixed times is never going to be fully reliable.

The same kind of synchronization in eValid is done WITHOUT interfering with the JavaScript engine at all. Instead, eValid synchronization commands run natively in the eValid browser -- you might say "in parallel with" -- and they are done with such low overhead that you never see any appreciable slowdown in the JavaScript.

Ergo, eValid AJAX support is very reliable and consistent.

The eValid Technology Group
eValid
 
Posts: 2392
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to AJAX Applications & DOM Processing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons