Skip to Content
Node.js Design Patterns - Third Edition
book

Node.js Design Patterns - Third Edition

by Mario Casciaro, Luciano Mammino
July 2020
Intermediate to advanced
664 pages
15h 24m
English
Packt Publishing
Content preview from Node.js Design Patterns - Third Edition

5

Asynchronous Control Flow Patterns with Promises and Async/Await

Callbacks are the low-level building blocks of asynchronous programming in Node.js, but they are far from being developer-friendly. In fact, in the last chapter, we learned techniques to implement different control flow constructs using callbacks, and we can say that they are quite complex and verbose compared to the (low) level of complexity of the tasks they try to accomplish. In particular, serial execution flow, which is the predominant control flow structure in most of the code we write, can easily lead an untrained developer to write code affected by the callback hell problem. On top of that, even if properly implemented, a serial execution flow seems needlessly complicated ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Complete Node.js Developer Course (3rd Edition)

The Complete Node.js Developer Course (3rd Edition)

Andrew Mead, Codestars By Rob Percival
Node.js - The Complete Guide

Node.js - The Complete Guide

Academind by Maximilian Schwarzmüller GmbH

Publisher Resources

ISBN: 9781839214110Supplemental Content