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

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?



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...


Thanks, and yep I meant newtwitter. (How long until we can call it twitter? :)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: