News for hackers. Stuff that matters.
Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by jashkenas on Monday November 08, 2010 @09:02AM (#1882476)
If you'd like to browse an example Todos application (with annotated source code) that fuses Backbone.js and HTML5 local storage, here's a good place to start:

http://documentcloud.github.com/backbone/examples/todos/inde...

The particular Backbone/LocalStorage integration works quite well for this little app, despite being simplistic:

http://documentcloud.github.com/backbone/docs/backbone-local...

Edit: There seem to be a lot of folks who think that Sammy is the only way to get client-side routing -- nothing could be further from the truth. Sammy asks you to structure your entire app around an inappropriate faux-server-side API, and Sammy apps don't work correctly in Internet Explorer because Sammy doesn't use an iframe to set history in IE. Doing hashchange events yourself only takes about a page of code, and handling hash URLs is a relatively tiny portion of a client-side app:

https://gist.github.com/624773

That said, so many folks have asked for hashchange routing that perhaps it would be wise to build a Backbone plugin for it that smooths over the difference between pushState and hashchange...

Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by boucher on Monday November 08, 2010 @02:16PM (#1883584)
Completely agree, and I'd definitely recommend an integrated history management component.
Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by sant0sk1 on Monday November 08, 2010 @10:45AM (#1882771)
Yes, I think a Backbone plugin that provided that would be very well received.