When making asynchronous HTTP requests from javascript, it can be very easy for code to descend into a tightly coupled mess of spaghetti as more and more requests are added.
jQuery has some good, under-appreciated functions that help you to apply patterns that keep the codebase clean. They're members of the jQuery `Deferred` object and the javascript playground has a short beginner-level tutorial, which is an easier introduction to using them than the official jQuery documentation.
You can read the tutorial here:
http://javascriptplayground.com/blog/2012/04/jquery-deferreds-tutorial
https://github.com/kriskowal/q
Does anyone have other recommendations in this area?