News for hackers. Stuff that matters.
Re:Basecamp Next: UI Preview by JCB_K on Thursday February 16, 2012 @02:52PM (#3600339)
Nicely done. Very fast as well, never seen a webapp load that quick. Anyone with a bit of explanation on how this is done?
Re:Basecamp Next: UI Preview by sstephenson on Thursday February 16, 2012 @02:58PM (#3600377)
Basecamp Next's speed comes from the combination of an aggressively cacheable design and HTML 5 pushState.
Re:Basecamp Next: UI Preview by rsanheim on Thursday February 16, 2012 @04:02PM (#3600616)
Can you expand on what sort of caching you are talking about? Client side caching in the JS layer, varnish or some other http level caching, some sort of server side in the Rails app itself, etc ?
Re:Basecamp Next: UI Preview by sstephenson on Thursday February 16, 2012 @04:26PM (#3600710)
All of the above.

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.

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?
Re:Basecamp Next: UI Preview by sohara on Thursday February 16, 2012 @04:15PM (#3600671)
Curious about how you're employing pushState. Is it through pjax or something similar?
Re:Basecamp Next: UI Preview by sstephenson on Thursday February 16, 2012 @04:27PM (#3600717)
We started out with pjax (which is awesome) but ended up rolling our own framework called Stacker which lets us have complete control over the UI.
Re:Basecamp Next: UI Preview by gr3g on Thursday February 16, 2012 @04:50PM (#3600819)
Any plans to open source Stacker?
Re:Basecamp Next: UI Preview by dhh on Thursday February 16, 2012 @05:00PM (#3600877)
Not for the time being. Stacker is specifically developed for this unique UI style that we're using for Next. We don't open source our UI elements.
Re:Basecamp Next: UI Preview by voidfiles on Thursday February 16, 2012 @07:31PM (#3601426)
Twitter open sourcing bootstrap just made the whole web better. Open source projects especially. Projects like https://github.com/dcramer/sentry benefitted a lot from bootstrap.

Making UI open source helps everyone.

Re:Basecamp Next: UI Preview by alexyoung on Thursday February 16, 2012 @07:24PM (#3601399)
You know who did open source their UI elements? Twitter, with Bootstrap. And you know how awesome that was for everyone? Pretty awesome!
Re:Basecamp Next: UI Preview by larrywright on Thursday February 16, 2012 @08:23PM (#3601583)
While I agree that Bootstrap is awesome (I use it myself), it's worth pointing out that what Twitter open sourced was not the magic of their core product, but rather the templates that they use to create internal applications. If you look at twitter.com, you don't see any of the same elements that are included in Bootstrap.
Re:Basecamp Next: UI Preview by voidfiles on Thursday February 16, 2012 @09:03PM (#3601709)
You mean besides all their UI widgets, right?

http://twitter.github.com/bootstrap/javascript.html

Re:Basecamp Next: UI Preview by voidfiles on Thursday February 16, 2012 @07:32PM (#3601431)
It's probably not that hard to reverse engineer what they are doing with Stacker.
Re:Basecamp Next: UI Preview by Jasber on Thursday February 16, 2012 @04:05PM (#3600629)
Are you pre-caching or just caching after the first hit?
Re:Basecamp Next: UI Preview by robertp on Thursday February 16, 2012 @04:26PM (#3600712)
Agreed. From the video it seems like this is a great way to see overviews of what is going on. And the overview seems really simple like a natural jump from current to Next. That is a big problem I have with current basecamp. I never try to read and think about the overview page cause it is so confusing. I am either in to-do or messages. Never in overview. I can't wait to get our company basecamp moved over.
Re:Basecamp Next: UI Preview by augustl on Thursday February 16, 2012 @05:25PM (#3600996)
I'm guessing they preload the overview data for projects in the background while you're on the overview. You can tell the difference when he clicks one of the comments. A whole lot of nothing happens for 0.5 seconds or so, then the comment loads.