Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm finding that, with the aid of Backbone, the Deferred methodology is becoming obsolete. For instance, as mentioned by someone else in these comments, a great use case for Deferred is firing off multiple queries and waiting on their return.

You can accomplish this in Backbone, inherently even, by listening to change events in models. In my app, I used the Deferred methodology to begin with, but now that I'm refactoring the site into Backbone, everything is much cleaner (thanks to the additional structure that MVC provides).



I'm working on a Backbone app where multiple XHRs are required to populate one model and after reading this article I'm thinking about using deferreds to only fire the change event once all the XHRs have finished. I can't think of a native Backbone way to do it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: