addyosmani/todomvc — pull request #256 by Atinux (2012-08-03 10:44:15+00:00)
Title: Improvements in Backbone.js application

**First, thanks to do this awesome job with TodoMVC, It's great to see some projects like this :)**

Here my modifications to respect the "best-pratices" in Backbone.js :

**Model** - js/models/todo.js

- remove `initialize` method in Model (useless because `defaults` do already the job)
- remove `clear` method, we should not change `clear` behavior of Backbone.Model -> http://backbonejs.org/#Model-clear

**Views** - js/views/app.js and js/views/todos.js

- Call model.destroy() (model.clear(); is not logic)
- Use this.$el instead of $(this.el) to improve readability and caching

Correct this issue: https://github.com/addyosmani/todomvc/issues/223 with adding `window.app.Todos.on( 'change:completed', this.addAll, this );` and `add` event call now `addAll` method in *js/views/app.js*

Issue related too: https://github.com/addyosmani/todomvc/issues/253

If you want to try the behavior of application, you can try the demo here: http://www.atinux.fr/demos/todomvc-backbone/