Geeks With Blogs

News Please visit me at my new blog!!

profile for Aligned at Stack Overflow, Q&A for professional and enthusiast programmers
"free in Christ Jesus from the law of sin and death." Romans 8:2 (ESV) Check out the Falling Plates video on YouTube.
more about the Gospel
And then listen to Francis Chan speaking at LifeLight in SD.

Programming and Learning from SD

If you ignore the Angular part of this article, it applies to JavaScript in general. If you're still using callbacks with $.ajax(, please look into Promises. jQuery has an implementation (though I've heard it doesn't exactly follow the standard.

It will be native in ES6 (the next version of JavaScript) – this is an in-depth on ES6 promises. - even the next IE will have it.

Wrangle Async Tasks With JQuery Promises

The Art of Promise-Based Architecture

Netflix JavaScript Talks - Version 7: The Evolution of JavaScript – go to minute 12:30 to watch about sync, async, callbacks and using promises. ES6 generator feature => yield and function* are also introduced.

Another good Promise article.

“Many of us are using promises without really understanding them.” We have a problem with promises. 

Promises reminds me of async/await in C#, are easier (in my opinion) to manage and maintain than callbacks, and are the new/current/future way to do asynchronous tasks in JavaScript.

It’s well worth the time to learn how to use them.

Posted on Tuesday, December 16, 2014 1:30 PM JavaScript | Back to top

Comments on this post: Not using JavaScript Promises? It is time to make the change.

# re: Not using JavaScript Promises? It is time to make the change.
Requesting Gravatar...
This is just projection.
You've just discovered promises and are urging everybody to make the change when in javascript-land, everybody made the decision to use/not use promises several years ago.
Left by bill_bones on Dec 17, 2014 6:20 PM

# re: Not using JavaScript Promises? It is time to make the change.
Requesting Gravatar...
Thanks Bill for the comment. You're right in a way. I started this blog post as an email to my co-workers many of whom are not aware of promises as they mostly do jQuery and MVC C#. They haven't had the same client side JavaScript experiences I've been privileged to do, so I was trying to encourage/urge them to take some time to look into it. Even if someone decided not to use them years ago, a lot has changed and I think it'd be worth their while to at least re-consider.
Left by Kevin on Dec 18, 2014 9:15 AM

Your comment:
 (will show your gravatar)

Copyright © Aligned | Powered by: