O'Reilly logo

jQuery Design Patterns by Thodoris Greasidis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing the concept of Promises

Promises, also known as Futures, are described by Computer Science as specialized objects that are used for synchronization of asynchronous, concurrent, or parallel procedures. They are also used as proxies to propagate the result of a task when its generation completes. This way, a Promise object is like a contract where an operation will eventually complete its execution, and anyone having a reference to this contract can declare their interest to be notified about the result.

Since they were introduced to JavaScript developers, as part of several libraries, they revolutionized the way we use asynchronous functions and compose them in implementation with complex synchronization schemes. This way, web developers ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required