Lockup by AJAX is unacceptable

by Jon 4/12/2008 7:59:00 PM

Brower Vendors: Please Add This To Your Unit Tests

http://www.jondavis.net/codeprojects/synctest/  

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Related posts

Comments

4/15/2008 10:08:24 AM

Andrew Mayorov

Jon, as far as I understand, this behavior can't be changed. JavaScript is single threaded, so if you state that request must be done in synchronous manner, then this only app thread should wait for request completion. Maybe you may scroll page during this delay, but I'd prohibit clicking, because it could be related to JS handlers that could not execute because thread is locked.

Andrew Mayorov ru

4/15/2008 7:53:25 PM

Jon Davis

Javascript is single-threaded, but single-threaded runtimes can be inturrupted by message pumps (mouse click, AJAX response, etc). You can also isolate the Javascript thread from the HTML renderer thread, and likewise you can seperate either or both contexts from the UI thread that the browser shell (operating system) is operating under.

I know that it's possible because Opera managed to pull it off, which is quite fantastic.

Jon Davis us

4/16/2008 3:55:10 AM

Andrew Mayorov

If you hit breakpoint in Firebug, then page continues to response somehow. But at the end it anyway got stuck. I think it's better just architect our apps in async manner. We can do it easily, while we can do virtually nothing with browser itself. Smile

Andrew Mayorov ru

4/17/2008 1:46:56 AM

Jon Davis

On the web, async coding is always better, I agree. That's why I've made such an effort to support asynchronosity in using.js, for example.

That said, it's not for me to determine how someone else codes up an app; if, for example, someone is prototyping functionality and they want to litter their app with synchronous code to run on localhost and demonstrate something without detailing it or tuning it for UX, I want them to feel free to use a "quick and dirty" prototyping toolset; more power to them.

Jon Davis us

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

7/23/2008 11:21:14 AM


 

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Jon Davis Jon Davis (aka "stimpy77") is a software and web developer by day and a software and web enthusiast (geek) by night. He was recently a senior web engineer for the enthusiast division of a major magazine publishing company for nearly two years. He has been a programmer, developer, and consultant for web and Windows software solutions professionally since 1997, with experience ranging from OS and hardware support to DHTML programming to IIS/ASP web apps to Java network programming to Visual Basic applications to C# desktop apps. Lately, Jon's professional focus has been on C#, ASP.NET, Windows services, WCF, custom Javascript libraries, and implementations of Lucene.net and telligent's Community Server for multiple web sites.
 
Software in all forms is also his sole hobby, whether playing PC games or tinkering with programming them. "I was playing Defender on the Commodore 64," he reminisces, "when I decided at the age of 12 or so that I want to be a computer programmer when I grow up."

E-mail me Send mail

Calendar

<<  July 2008  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Pages

    Recent posts

    Recent comments

    Authors

    Tags

    Blogroll

    Download OPML file OPML

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in