Todos: a Backbone.js example Single-Page-App (with LocalStorage)
documentcloud.github.com
documentcloud.github.com
With the help of jashkenas, I created this app to test my implementation of Backbone.js for MooTools (http://github.com/jeromegn/backbone-mootools) and my localStorage adapter (http://github.com/jeromegn/Backbone.localStorage for those interested). It just so happened that jashkenas had been aching for a decent example app, so he reported it to jQuery and included it in the repository.
My own version of this demo is available here (with an extra sorting feature, and built on MooTools) http://localtodos.com/ (source: http://github.com/jeromegn/localtodos)
Hope you like it.
My experience with more advanced Javascript is with MooTools, so I found it familiar to build Class-like objects. I rather enjoyed the experience and I'll be using it to replace the codebase for my more complex project.
The documentation is exhaustive and with that example app, annotated et al., it's even better. I also am very confident in Jeremy's skills as the project maintainer, he helped me a lot and has proven he creates great Javascript libraries.
The API seems stable enough. From Backbone 0.1.2 to 0.2, there weren't that many differences in the API, mostly nice additions.
I think the more intuitive way of doing it is adding some sort of a commit-on-click-out feature ..
http://documentcloud.github.com/backbone/docs/todos.html#sec...
Edit, no, it's here: http://documentcloud.github.com/backbone/docs/todos.html
More examples:
Underscore: http://jashkenas.github.com/coffee-script/documentation/docs...
Backbone: http://documentcloud.github.com/backbone/docs/backbone.html
CoffeeScript: http://jashkenas.github.com/coffee-script/documentation/docs...
I believe they're all generated with Docco: http://jashkenas.github.com/docco/
ever since seeing Dox I have made a much larger effort to essentially create a reference for everything I write (in a perfect world this would be a given).
But I jest. It would be most welcome.
Anyways, here is Pycco's new homepage: http://fitzgen.github.com/pycco/
That said, I do like the simplicity of backbone.js.
That said, we (DocumentCloud) have also open-sourced Jammit -- the library we use to build JS, CSS, and JS templates into asset packages for production:
http://documentcloud.github.com/jammit/
Here's a screenshot of what it looks like to have a bunch of Backbone Models and Views that will get Jammit'd into a single file at deploy time:
Todos.pluck("content");
Todos.first().toggle();
Todos.last().clear();(only it uses web SQL DB instead of local storage)