With the advent of HTML5, front-end MVC, and Node.js, JavaScript is ubiquitous--and still messy. This book will give you a solid foundation for managing async tasks without losing your sanity in a tangle of callbacks. It's a fast-paced guide to the most essential techniques for dealing with async behavior, including PubSub, evented models, and Promises. With these tricks up your sleeve, you'll be better prepared to manage the complexity of large web apps and deliver responsive code.
With Async JavaScript , you'll develop a deeper understanding of the JavaScript language. You'll start with a ground-up primer on the JavaScript event model--key to avoiding many of the most common mistakes JavaScripters make. From there you'll see tools and design patterns for turning that conceptual understanding into practical code.
The concepts in the book are illustrated with runnable examples drawn from both the browser and the Node.js server framework, incorporating complementary libraries including jQuery, Backbone.js, and Async.js. You'll learn how to create dynamic web pages and highly concurrent servers by mastering the art of distributing events to where they need to be handled, rather than nesting callbacks within callbacks within callbacks.
Async JavaScript will get you up and running with real web development quickly. By the time you've finished the Promises chapter, you'll be parallelizing Ajax requests or running animations in sequence. By the end of the book, you'll even know how to leverage Web Workers and AMD for JavaScript applications with cutting-edge performance. Most importantly, you'll have the knowledge you need to write async code with confidence.
What You
Basic knowledge of JavaScript is recommended. If you feel that you're not up to speed, see the "Resources for Learning JavaScript" section in the preface.
(4.0) Very narrowly focused, but good for it, and very informative
Burnham just bites off one piece of JavaScript programming that commonly leads us to write horrible, horrible code...yet is also one of the greatest assets of the language: asynchronicity without concurrency. So a very well chosen topic, and he develops it well. I learned a lot from this, usually something new on each page. He could develop a few of his examples more (or rather, explain them more thoroughly): there was a fair amount of figuring-it-out to do on your own. Also liked some of his wackier cultural references (e.g. "Bo Knows" manages to come up in a book published in the 2010s? Nutty!).
Highly recommended once you've done some legitimate programming in JavaScript. Good litmus test is whether you've found yourself nesting callbacks two levels deep. If you haven't and you've just been doing easy Ajax stuff in jQuery, you're not going to need this (yet).
It was a relatively short book and it reads easy. The author starts by explaining how asynchronous javascript works. Throughout the book, he writes about various techniques (e.g. how to use promises/deferreds, flow control with async.js, web workers, etc.) on async programming in javascript. My previous perception on async programming that it makes code ugly (i.e. too many nesting) is gone now. It will take time to get used to this style of programming, but it opened my eyes on another possibility.
I agree with Brian Park's review. Yes, it will take time to get used to this style of programming. The reward is that the techniques introduced in this book will allow for simpler (and yet much more powerful), scalable use of the JavaScript language. Thanks much to Trevor Burnham for this timely work.
Excellent resource for cutting-edge JavaScript. Lots of up-to-date information on important patterns and libraries we could (and should!) be using. Focuses on various asynchronous patterns, including events, promises, and web workers. Absolutely recommended as the next "must-read" JavaScript book for those doing advanced work.
Really like the introductory sections that really dive into JS event queuing, and improved all around. Strongly recommend this for anyone doing real JS development beyond 3-liner jQuery click-handling.
Worth re-reading even if you read the original edition!
Concise and compact book with focus on its topic. Thanks to it I have a better understanding of "no interrupt" model of single threaded javascript.
Though I didn't comprehend distributed event and promise chapter fully (not a native jquery user) I did manage to introduce myself to few interesting topics:
async.queue(), web workers/cluster, async script loading and taming js into a sync language such as python using library like TameJS.
Could not complete it as I felt it is very outdated compared to the present style of writing code, it was published in 2012, maybe it would have been useful 2-3 years ago but not now.
Just read the updated edition, even better than the first! Chapters 1 and 6 seem like mostly new material, and Chapter 1 does a great job of setting up how events work in JavaScript in general, and filled in some holes in my knowledge.
Still one of my favorite and most up-to-date JS books, and I recommend everyone read it, and if you read the old edition, read the new chapters!
(I did read the new paperback edition, sorry I am lazy and did not create a new edition for it, though it shares this cover...)
Potrebbe essere il riferimento definitivo alla programmazione asincrona in Javascript. Purtroppo l'argomento è abbastanza complesso, e, pur elencando i vari sistemi utilizzabili sia lato server (Node) che lato client (Worker), non li approfondisce abbastanza da renderli utilizzabili.
La mancanza cronica di esempi pratici non aiuta la comprensione. Gli esempi di codice presenti si limitano a "ecco, se fate così, la sequenza di esecuzione è questa".
It is a short but relatively informative introduction to asynchronous JavaScript. It covers JavaScript's single-threaded event model, what a "PubSub" is and how to roll your own, good patterns for writing asynchronous error handlers, handling flow control with Async.js, using Web Workers, and asynchronous script-loading with Require.js. It is less than 100 pages, packed with content and covers its promised topic well.
A good practical book for anyone taming the asynchronous nature of Javascript. It could be read in a few days, but the concepts it teaches you are invaluable.
May be it's a bit outdated and it makes a lot of accents on Backbone and Node.
I've enjoyed reading it, the book is written nicely and it's simple to read.
Provides a relatively short, yet comprehensive overview of the current state of the async operations in JavaScript. It can be useful to ActionScript developers too, as the ECMAScript family shares very similar issues.
I wish there were a few more examples in this book.
Excellent discussion of JavaScript's async mechanisms. The chapter on Promises alone is worth the read! More detailed review: http://weblog.west-wind.com/posts/201...
For someone coming to (modern?) browser JavaScript and Node.js from server-side languages like Ruby and Python, this is an amazing introduction to the async libraries out there and the application design patterns associated with them.