todos app (backbone example) rewritten in brunch
Switch branches/tags
Nothing to show
Pull request Compare This branch is 33 commits behind brunch:gh-pages.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is a rewrite of Todos (Backbone's example application). We rewrote it to provide a simple and complete brunch example. This example also contains a test suite using QUnit. Special thanks to Jérôme Gravel-Niquet for his groundwork.

App Structure

In this example the todo list renders each list item. This has two disadvantages. Once it lacks performance if you include each item instead of generating the whole list and insert it at once. See for more Information. Futher you add a lot of event listeners. If you would add the whole list and bind the events to it, the events from the list items bubble up to the list element and you could catch them there.

Why didn't we do that in this example? Unless you have a large set of items the performance difference is not that big, but the code is much easier to read because it's better encapsulated.


Use brunch build or brunch watch to compile changes in src folder. Usually we don't track the js/css files in our repositories, but decided to keep them here because we hope it would be easier to start using it.

How to run tests

To regenerate js test files run

cake compileTests

and view test/index.html in your browser.


  • Add unit tests for views
  • Add inline comments