News for hackers. Stuff that matters.
Re:Announcing Backbone.js: Models, Collections and Views in ... by swah on Wednesday October 13, 2010 @02:51PM (#1788354)
So if we were designing the Twitter front page with Backbone, we would have models like TrendingTopics, WhatYouDoing, NewMsgs and some more. They would be updating against the server using JSON, and calling some render code so they redraw themselves when there is new data.

If we didn't have Backbone, we would probably call a main JSON sync function repeatedly, and iterate on this new data updating the different parts of the page "manually".

Is that it?

Re:Announcing Backbone.js: Models, Collections and Views in ... by jashkenas on Wednesday October 13, 2010 @02:59PM (#1788386)
A more apt comparison is the "new twitter" homepage. If you load it and keep an eye on your Ajax requests, you'll see something like this:

http://cl.ly/b043f31cd91dfdac8918

There, Recommendations, Friends, Followers, and Memberships are the models, and render off the contents of that JSON. Of course, Twitter should really be bootstrapping all of those bits of JSON into the initial page load, instead of firing off six requests immediately...

Re:Announcing Backbone.js: Models, Collections and Views in ... by swah on Wednesday October 13, 2010 @03:51PM (#1788604)
Thanks, and yep I meant newtwitter. (How long until we can call it twitter? :)