4 ms·
Backbone.js sample app with Sinatra Backend
- jashkenas 16y agoUnfortunately, the example app is fairly broken and quickly XSS'd at the moment. Hopefully Ryan can fix it up. EDIT: Yep -- quickly fixed and deployed. Thanks, Ryan.
- ryandotsmith 16y agothanks for the making me aware of .html() and .text() :)
- bgrins 16y agoThat was quick! I was wanting to see some sample apps with backbone, thanks for sharing. By the way, if you have the .0.1.1 release, you can call this.handleEvents(); inside of the initialize() function on the template instead of the render() function. This prevents having to rebind the element every time you call render. This probably won't be a huge issue considering that you are only binding one event each time, but it is probably best practice anyway.
- niels 16y agoThanks for this. Just in the process of migrating my app to Backbone.js.
- grncdr 16y agoAnother one chiming in to say thanks. Backbone is really intriguing and this post does a nice job of walking through the basics of how to use it.