Learning jQuery Deferreds: Taming Callback Hell with Deferreds and Promises (Paperback)
暫譯: 學習 jQuery Deferreds:用 Deferreds 和 Promises 鎮壓回呼地獄 (平裝本)
Terry Jones, Nicholas H. Tollervey
買這商品的人也買了...
-
$199正則表達式必知必會 (修訂版)
商品描述
Orchestrating asynchronous function calls in JavaScript often leads to callback hell, but there is a reliable way to avoid this painful state of affairs. With this concise and simple guide, you’ll learn how to use jQuery deferreds and promises, an elegant approach for managing asynchronous calls in both client and server applications.
This book contains 18 examples that use deferreds to solve progressively challenging real-world programming problems, along with 75 stimulating puzzles (and their solutions) that will help you understand how and when to use deferreds. Experienced JavaScript programmers will learn new tricks in a fun way, and become immersed in the practice of event-based programming.
- Understand the logic behind creating deferreds and returning promises
- Get a structured explanation of jQuery’s deferred API
- Delve into the dynamics of using deferreds
- Explore a broad collection of useful deferred recipes developed by the authors
- Gain hands-on experience by solving challenges that accompany each recipe
- Go deeper into deferreds: encounter novel abstractions and mind-bending use cases
商品描述(中文翻譯)
協調 JavaScript 中的非同步函數呼叫常常會導致回呼地獄,但有一種可靠的方法可以避免這種痛苦的狀況。透過這本簡潔且易懂的指南,您將學會如何使用 jQuery 的 deferreds 和 promises,這是一種優雅的方式來管理客戶端和伺服器應用程式中的非同步呼叫。
本書包含 18 個範例,使用 deferreds 來解決逐漸具有挑戰性的現實世界程式設計問題,以及 75 個刺激的謎題(及其解答),這些將幫助您理解何時以及如何使用 deferreds。經驗豐富的 JavaScript 程式設計師將以有趣的方式學習新技巧,並沉浸於事件驅動程式設計的實踐中。
- 理解創建 deferreds 和返回 promises 背後的邏輯
- 獲得 jQuery 的 deferred API 的結構化解釋
- 深入探討使用 deferreds 的動態
- 探索作者開發的廣泛有用的 deferred 食譜
- 通過解決每個食譜附帶的挑戰來獲得實踐經驗
- 更深入了解 deferreds:遇見新穎的抽象概念和令人費解的使用案例