Main Content

Deferreds - Putting Laziness to Work

About the Talk

April 16, 2011 1:15 PM

Microsoft, Mt. View, California

Microsoft, Mt. View, California

About four nested callback functions later, you realize that something needs to change. You wanted this site's code to be organized, maintainable, testable and DRY right? Wouldn't it be nice if your callbacks could run when any function was complete, even asynchronous ones? And how about if you could chain that callback, for example, to the $.ajax() call you just made? Or build your own and decide when to fire any bound callbacks? Meet $.Deferred, the feature that satisfies all of these needs. Think of it like callbacks on steroids. Plus, it's already used by $.ajax() for asynchronous awesomeness. We'll cover the basics of creating and using Deferreds and bring those principles into application architecture. You'll learn great ways to integrate Deferreds into your site's code and reap some sweet benefits. In short, you'll learn how to separate components of your application amongst synchronous and asynchronous behaviors. Saving time and reducing headaches: included.

Ratings and Recommendations

Avg. Rating

Average based
on 14 ratings

comments powered by Disqus