ECMAScript 2015, 2016 and beyond are adding powerful new features to our beloved programming language. Asynchronous programming support with Promises, Generators and the async/await proposal allow us to write asynchronous code that's clean and normal looking. We can dispense with ugly boilerplate required when using asynchronous helper libraries. Inside correctly constructed functions, Generators and Async Functions, our asynchronous code looks and acts like regular synchronous code, meaning we can easily write normal loops containing asynchronous code.
It's a breath of fresh air, that not only looks right, but error reporting is vastly improved, which should improve code reliability.
This book walks you through the new asynchronous programming features in ES-2015, ES-2016 and the proposed async/await feature. The first half covers basic coding constructs, showing how to implement several looping constructs using the "async" library, Promises, Generators, and the proposed async/await feature. The second half of the book takes an in-depth look at using these features in production code. All through the book examples are given with real working code, along with comprehensive discussions of how the code works.
Node.js is the primary JavaScript platform used in the book for ease of demonstrating the concepts. We also show how to implement everything in modern browsers. Because the features are not available on all JavaScript engines, the book demonstrates how to use Babel to transpile/rewrite the code to run as ES-5 compliant JavaScript.
About the Author: David Herron is a software engineer and writer living and working in Silicon Valley for over 25 years. His software career spans several generations of the Internet, including a stint of over 10 years in the Java SE team at Sun Microsystems. In the mid-90's he helped to port Internet Explorer 3 to Unix. His Node.js use began while working on Yahoo's Manhattan/Mojito platform for hosting Node.js applications. His book, Node.js Web Development, is in its third edition.
It's a breath of fresh air, that not only looks right, but error reporting is vastly improved, which should improve code reliability.
This book walks you through the new asynchronous programming features in ES-2015, ES-2016 and the proposed async/await feature. The first half covers basic coding constructs, showing how to implement several looping constructs using the "async" library, Promises, Generators, and the proposed async/await feature. The second half of the book takes an in-depth look at using these features in production code. All through the book examples are given with real working code, along with comprehensive discussions of how the code works.
Node.js is the primary JavaScript platform used in the book for ease of demonstrating the concepts. We also show how to implement everything in modern browsers. Because the features are not available on all JavaScript engines, the book demonstrates how to use Babel to transpile/rewrite the code to run as ES-5 compliant JavaScript.
About the Author: David Herron is a software engineer and writer living and working in Silicon Valley for over 25 years. His software career spans several generations of the Internet, including a stint of over 10 years in the Java SE team at Sun Microsystems. In the mid-90's he helped to port Internet Explorer 3 to Unix. His Node.js use began while working on Yahoo's Manhattan/Mojito platform for hosting Node.js applications. His book, Node.js Web Development, is in its third edition.