
Learning jQuery Deferreds
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- Copyright
- Table of Contents
- Preface
- About You
- Our Aims
- Challenges
- jQuery Deferreds
- Our JavaScript Coding Style, or Lack Thereof
- Conventions Used in This Book
- Using Code Examples
- Safari® Books Online
- How to Contact Us
- Acknowledgments
- Chapter 1. Introduction
- Food for Thought
- Terminology: Deferreds and Promises
- Familiar Promises
- Chapter 2. The jQuery Deferred API
- Consuming Promises
- More Terminology: Resolve, Reject and Progress
- done
- fail
- always
- progress
- promise
- then
- state
- when
- Creating Deferreds
- Construction
- resolve and resolveWith
- reject and rejectWith
- notify and notifyWith
- Putting It All Together
- Deferred Dynamics
- Deprecated Promise Methods
- isRejected and isResolved
- pipe
- Changes in the jQuery Deferred API
- Chapter 3. Deferred Recipes
- A Replacement for the setTimeout Function
- Challenges
- Messaging in Chrome Extensions
- Challenges
- Accessing Chrome Local Storage
- Challenges
- Running Promise-Returning Functions One by One
- Challenges
- A Promise Pool with an emptyPromise Method
- Creating a Promise Pool
- Using the Promise Pool
- Challenges
- Displaying Google Maps
- Challenges
- Communicating with a Web Worker
- The Web Worker Code
- Creating a Web Worker
- Using It
- Summary
- Challenges
- Using Web Sockets
- The Web Socket Server
- The Web Socket Client
- Challenges
- Automatically Retrying Failing Deferred Calls
- Challenges
- Memoization
- Discussion
- Avoiding the Dogpile Effect
- Challenges
- Short-Term Memoization of In-Progress Function Calls
- createUser Is Not Idempotent
- Challenges
- Streaming Promise Events
- Delivering More Information
- Delegating the Event Stream
- To Be Continued.
- Challenges
- Getting the First Result from a Set of Promises
- Which Promise Fired?
- A Fly in the Soup
- delegateEventStream Redux
- Challenges
- A Deferred Queue
- Challenges
- when2: An Improved jQuery.when
- Using when2 to Time Out a Single Promise
- Differences from $.when
- Challenges
- Timing Out Promises
- Challenges
- Controlling Your Own Destiny
- Challenges
- Deactivating a Promise
- Challenges
- Chapter 4. More Time in the Mental Gymnasium
- Do You Really Understand jQuery Deferreds?
- Promises/A+
- Promises Are First-Class Objects for Function Calls
- Asynchronous Data Structures
- Advantages of Deferreds
- Difficulties with Deferreds
- Further Reading
- Appendix A. Hints for Selected Challenges
- A Replacement for the setTimeout Function
- Messaging in Chrome Extensions
- Accessing Chrome Local Storage
- Running Promise-Returning Functions One by One
- A Promise Pool with an emptyPromise Method
- Displaying Google Maps
- Communicating with a Web Worker
- Using Web Sockets
- Automatically Retrying Failing Deferred Calls
- Memoization
- Short-Term Memoization of In-Progress Function Calls
- Streaming Promise Events
- Getting the First Result from a Set of Promises
- A Deferred Queue
- when2: An Improved jQuery.when
- Timing Out Promises
- Controlling Your Own Destiny
- Deactivating a Promise
- Appendix B. The Promises/A+ Specification
- Terminology
- Requirements
- Promise States
- The then Method
- The Promise Resolution Procedure
- Appendix C. Converting an ArrayBuffer to Base 64
- About the Authors
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.