-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Learning Node.js for .NET Developers
By :
Promises allow us to address some of the shortcomings of the callback pattern and write more readable code. Now we have a new problem, though. One of the merits of Node.js is the consistent approach to asynchronous programming. We seem to have negated this by introducing promises as well as the conventional callback pattern.
Furthermore, although native promises are new to ECMAScript 2015, the concept is not new. There are many pre-existing libraries that provide their own implementation of promises.
Fortunately, these competing approaches to asynchronous programming are actually very consistent. The biggest value of the consistency in the Node.js-style callback pattern comes from the following:
Promises are completely consistent with the above points. There is also excellent compatibility between different implementations...
Change the font size
Change margin width
Change background colour