3 ms·
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 updat
by swah 16y ago
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?
- jashkenas 16y agoA 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 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...
- swah 16y agoThanks, and yep I meant newtwitter. (How long until we can call it twitter? :)