JavaScript with Promises Год: 2015 Автор: Daniel Parker Жанр: javascript Издательство: O'Reilly Media ISBN: 978-1-4493-7320-7 Язык: Английский Формат: ePub Качество: Изначально компьютерное (eBook) Интерактивное оглавление: Да Количество страниц: 80 Описание: Asynchronous JavaScript is everywhere, whether you’re using Ajax, AngularJS, Node.js, or WebRTC. This practical guide shows intermediate to advanced JavaScript developers how Promises can help you manage asynchronous code effectively—including the inevitable flood of callbacks as your codebase grows. You’ll learn the inner workings of Promises and ways to avoid difficulties and missteps when using them. The ability to asynchronously fetch data and load scripts in the browser broadens the capabilities of JavaScript applications. But if you don’t understand how the async part works, you’ll wind up with unpredictable code that’s difficult to maintain. This book is ideal whether you’re new to Promises or want to expand your knowledge of this technology.
Примеры страниц
Оглавление
Chapter 1 Asynchronous JavaScript Callbacks Asynchronous JavaScript Run to Completion and the Event Loop Summary Chapter 2 Introducing Promises Basic Usage Multiple Consumers Promise States Chaining Promises Callback Execution Order Basic Error Propagation The Promise API Summary Chapter 3 Working with Standard Promises The Async Ripple Effect Conditional Logic Parallel Execution Sequential Execution Using Loops or Recursion Managing Latency Functional Composition Summary Chapter 4 Using Libraries and Frameworks Promise Interoperability and Thenables The Bluebird Promise Library Promises in jQuery Summary Chapter 5 Error Handling Rejecting Promises Passing Errors Unhandled Rejections Implementing try/catch/finally Using the Call Stack Summary Chapter 6 Combining ECMAScript 6 Features with Promises Destructuring Arrow Functions Iterables and Iterators Generators Summary
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum