segunda-feira, 29 de agosto de 2011

A Todo App written in backbone.js


Hey Guys,

I'm back again :)

I the weekend I write a simple app based on the Backbone.js demo the Todo App, this app is very simple, and has only one model. In my first studies I'm tried to make this todo model related to an todo list, such as the 37Signals' application Tada List, here you have a main list, and you add your tasks inside this list. But I fail with that, I can't understand Backbone itself, and I'm trying to do JQuery things and Rails Things on the backbone, and the app is not what I'm trying to do. You can checkout the source code of this fail (but working) app here:

Well, I forget that app, and I passed to study more about the backbone, I take a look inside the router, written the backbone-galley in a rails app, and that give me more details about the backbone. With that visions I tried to write the todo-list app again, but for now, I using Rails 3.1.rc5 and coffeescript, I have no problems with coffeescript insted of JavaScript, and I don't know why many people hates coffeescript.

After that write the app comes up and you can checkout the source code at, I'm choice the haml-js for the views, I really love haml :), for the Rails 3.1 I used that gem ( for render the haml-js template, and works like magic.

Going back to the app,  the only view that was served by the rails is the home/index.html.haml, wich have only the div wich is used for render the templates, all of you can see is rendered for backbone.

That's all folks

0 comentários:

Design by ThemeShift | Bloggerized by Lasantha - Free Blogger Templates | Best Web Hosting