Chapter 7. Asynchronous Control Flow Patterns
This chapter is dedicated to development patterns that are used to ease the programming of asynchronous and concurrent procedures.
At first, we will have a refresher on how Callbacks are used in JavaScript programming and how they are an integral part of web development. We will then proceed and identify their benefits and limitations when used in large and complex implementations.
Right after this, we will be introduced to the concept of Promises. We will learn how jQuery's Deferred and Promise APIs work and how they differ from ES6 Promises. We will see where and how they are used internally by jQuery to simplify its implementation and lead to more readable code. We will analyze their benefits, classify the best matching use cases, and compare them with the classic Callback Pattern.
By the end of this chapter, we will be able to use jQuery Deferred and Promises to efficiently orchestrate the execution of asynchronous procedures...