Promises, Promises

Image

In JavaScript, callbacks are now test incidents.

JavaScript programs are especially prone to failure. Although they are an integral part of any non-trivial web application, and the language is loved by many, the experience of most people who have written, tested or debugged them, whether for production or for test automation purposes, bears this out.

The reason is probably that JavaScript is single-threaded yet is frequently needed
to behave asynchronously. When invoking a method or function, it often cannot be allowed to wait for the invoked code to complete execution and return its result, because the invoked code may need to wait a long time for something else to happen, for example data to download or a web service to respond.

Read the rest of this article on page 20.

Schedule a Free Consultation

Quickly ramp-up teams and accelerate the delivery of your new software product.