Although non-mobile-web-developers may not realize, there is one "feature" of Javascript that causes a lot of pain to Javascript every day -- although they may deny it, a case of [Stockholm Syndrome](http://en.wikipedia.org/wiki/Stockholm_syndrome), me thinks. That pain point is called __asynchronous programming__. Here's the problem. Javascript in the browser does not support threads. All the rendering of the page and the Javascript logic that has to be executed shares a single thread. That is OK as long as you do simple things. Simple DOM manipulations, input field validation and so on. But what if you need to do things that could take a while, say, talk to a database, send an HTTP request to the server -- what happens then? In typical synchronous style programming such a HTTP request could look as follows: var content = fetchURL('http://www.yahoo.com'); processContent(content); However, fetching the URL could take seconds. Due to the unthreaded nature of this environmen
More
Support this project and others with 1-click micro-donations
