Jump to ratings and reviews
Rate this book

JavaScript Promises Essentials

Rate this book
If you are a JavaScript developer working with asynchronous operations and want to know more about promises, then this book is ideal for you. Having a detailed explanation of JavaScript promises will be perfect as your next step towards adopting this new standard and using the API in your web and JavaScript applications.

90 pages, ebook

First published January 1, 2014

1 person is currently reading
2 people want to read

About the author

Rami Sarieddine

4 books3 followers
During the day I work as a Technical Evangelist with Microsoft while managing the Windows Apps ecosystem in the Gulf region. When not working, I try to write technical books. I have 2 published books to date which include:

- Developing Windows Store Apps with HTML5 and JavaScript
- JavaScript Promises Essentials

Prior to joining Microsoft I was writing code and developing web applications for some good 7 years. I was awarded Microsoft Valued Professional (MVP) in ASP.NET/IIS and Visual C#, in 2012 and 2013 consecutively . In that period, I was working closely with Microsoft Lebanon, and was featured a frequent speaker at their events namely TechDays Beirut and Open Door. As part of that tenure, I have delivered numerous training sessions and workshops on HTML5, .NET, Windows Apps, Visual Studio and Microsoft Azure targeting developers, IT enthusiasts and university students.

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1 (8%)
4 stars
6 (50%)
3 stars
3 (25%)
2 stars
2 (16%)
1 star
0 (0%)
Displaying 1 - 4 of 4 reviews
9 reviews
November 23, 2014
Pros

There was never a time before when JavaScript had been this popular. Same popularity for the JavaScript promises as well. So this book will give, what you need to know about the Javascript Promises.

I have read the first chapter of this book and it's a really good one. So I'm going to share the thoughts of mine about this chapter with you.Let's start it.

In the first section the author has explained what is Asynchronous programming in JavaScript and has described the history of AJAX and the importance of non blocking UI. This section explains about the Issues that developers face with traditional approaches to handle, asynchronous operations.After that, about the callbacks. In this section we can learn about the callbacks.More importantly,it's by using very simple examples where anyone can understand.

Then he moved into the Introduction to JavaScript Promises section. In this section we can learn about the promises, its states,how it can be used and the usage of promises chaining.All are explained by using simple examples and step by step explanations.It's very cool.

In the last section of the first chapter the author has explained Why Can't we just use a callback and Why we should care about promises when comparing it to the common way of doing things asynchronously. Simple examples have been provided for understanding the concepts more easily where even for the beginner level of the JavaScript developers.Which is really great.

Some of the code snippets have been put on the JsFiddle. Which is really cool.

This is a concise book (~ 90 pages), were directly targeted to the most needed materials about the JavaScript Promises .

Cons

I have seen a typo issue in first chapter : "Additionally, callbacks are lightweight since we need to add extra libraries." It should be corrected as "Additionally, callbacks are lightweight since no need to add extra libraries."

The other complain where I have about this book is with the formatting of the Code snippets.Currently it's in Black and White (mono) way. As a reader, I would like to have a color syntax for the code snippets.If so,It'll give a huge value for the packt's books.

Read more : http://sampathloku.blogspot.com/2014/...
Profile Image for Kenneth Geisshirt.
Author 5 books
December 4, 2014
Promises are an old pattern in concurrent programming. In the computer science literature, promises date back to the papers by Friendman and Wise from mid 1970s. Many programming languages have promise - and futures as in Java are a similar idea. A promise is a variable or an object which value is initially unknown and is the result of another task. Modern JavaScript development is highly asynchronous by design: the UI (in the web browser) is updated by calls to the backend using HTTP requests.

JavaScript (ECMAScript to be correct) will soon have promises build into the core of the runtime environment, and promises already exist in many libraries and frameworks. If you haven’t worked with promises in a JavaScript context before, now is a good time to begin. In order to ease the use of promises in JavaScript development, the Promises/A+ standard has emerged.

The book is short and divided in six chapters. The first chapter is an introduction to the state of front-end JavaScript development in general and the asynchronous model in particular. The chapter sets the scene for the rest of the book, and discuss how promises fit well into JavaScript.

The second chapter is written in a very dense format using many bullet lists. You are probably going to read the chapter more than once to get all the information. The good news is that is a lot of information. Chapters 2-4 are a presentation of how to use promises, include error handling.

Chapter 5 is devoted to WinJS - the open source library for development of Windows 8 and Windows mobile applications in JavaScript. Personally, I don’t develop for any of the Microsoft stacks, but the chapter is still useful as it shows how a widely used library is applying the promise concepts.

The final chapter explains how to implement your own promise library. I guess that there exist many in-house JavaScript libraries. If you have such a library, you will find this chapter useful.

In general, the book is well-written. The usage of bullet list many place (and chapter 2 in particular) can make it hard to read the book. Still, any JavaScript developer should read the book and get ready to the great promise of promises. You can find more information about the book at http://bit.ly/1tVPjOT
Profile Image for David.
134 reviews22 followers
May 24, 2015
The information in this book is very useful for those interested in looking at ES6 promise implementations. Though it doesn't target any specific library too heavily, WinJS gets the most attention, late in the book. For the most part though, the information is relevant to a variety of users and their frameworks of choice.

The book finishes off with some great coding examples, however until that point I had begun to feel the book was reading way too much like an MSDN article: lots of non layman's dictionary-style definitions of coding concepts and little to no coding examples to demonstrate and cement it all in. Much of the middle of the book felt this way to me, but again the author certainly wasn't guilty of this in the final chapter.

It's great to see a collection of current information on where promises are going (or are currently at due to some of the more progressive browser makers and solid polyfills as a crutch for the stragglers), and some of the clearest explanations of the differences between promises and callback patterns (and the advantages the former has over the latter).
Displaying 1 - 4 of 4 reviews

Can't find what you're looking for?

Get help and learn more about the design.