Re:Basecamp Next: UI Preview
by hello_moto on Thursday February 16, 2012 @05:53PM
(#3601090)
Do you mean:
1) it's a single page app
2) you're using ERB fragments (or something) as "templates"
3) MVC fat-client
Is this... more or less it?
Re:Basecamp Next: UI Preview
by sstephenson on Thursday February 16, 2012 @06:09PM
(#3601154)
It's not a single-page app—at least not in the traditional sense. Only in the sense that we don't need to reload assets with each page change.
We are using a dash of Backbone here and there for cases where interaction speed is of utmost importance, but most of what you download over the wire is HTML.
Re:Basecamp Next: UI Preview
by hello_moto on Friday February 17, 2012 @10:40AM
(#3603668)
Does the Sheet paradigm supports back-button? (just curious) if so, is it via normal browser history or AJAX '#' trickery?
On the app level, each fragment of markup is free of user-specific data so all users can share the same cache. (User-specific concerns are pushed down into JavaScript and CSS.) Those cache fragments are then nested, so we can cache at all levels of display: an individual to-do item, the to-do list with all its items, all to-do lists in a project, and the entire project itself.
At the HTTP level, we send an ETag in the response for every GET request. Since our app caching means we don't incur the cost of a full render, we can serve the requests very quickly and avoid sending back the contents of the page if your browser already has it.
At the JavaScript level, we cache DOM elements for every sheet you've visited in the current page load, and display them immediately (while fetching the latest version in the background) when you re-visit a URL.