# Exercise 1: Todos - Your First Backbone.js App Now that we've covered fundamentals, let's write our first Backbone.js application. We'll build the Backbone Todo List application exhibited on [TodoMVC.com](http://todomvc.com). Building a Todo List is a great way to learn Backbone’s conventions. It's a relatively simple application, yet technical challenges surrounding binding, persisting model data, routing, and template rendering provide opportunities to illustrate some core Backbone features. ![](img/todos_a.png) Let's consider the application's architecture at a high level. We'll need: * a `Todo` model to describe individual todo items * a `TodoList` collection to store and persist todos * a way of creating todos * a way to display a listing of todos * a way to edit existing todos * a way to mark a todo as completed * a way to delete todos * a way to filter the items that have been completed or are remaining Essentially, these features are classic [CRUD](http://en.wikipedia.org/wiki/Create,_read,_update_and_delete) methods. Let's get started! ## Static HTML We'll place all of our HTML in a single file named index.html. #### Header and Scripts First, we'll set up the header and the basic application dependencies: [jQuery](http://jquery.com), [Underscore](http://underscorejs.org), Backbone.js and the [Backbone LocalStorage adapter](https://github.com/jeromegn/Backbone.localStorage). ```html Backbone.js • TodoMVC ``` In addition to the aforementioned dependencies, note that a few other application-specific files are also loaded. These are organized into folders representing their application responsibilities: models, views, collections, and routers. An app.js file is present to house central initialization code. Note: If you want to follow along, create a directory structure as demonstrated in index.html: 1. Place the index.html in a top-level directory. 2. Download jQuery, Underscore, Backbone, and Backbone LocalStorage from their respective web sites and place them under js/lib 3. Create the directories js/models, js/collections, js/views, and js/routers You will also need [base.css](https://raw.github.com/tastejs/todomvc-common/master/base.css) and [bg.png](https://raw.github.com/tastejs/todomvc-common/master/bg.png), which should live in an assets directory. And remember that you can see a demo of the final application at [TodoMVC.com](http://todomvc.com). We will be creating the application JavaScript files during the tutorial. Don't worry about the two 'text/template' script elements - we will replace those soon! #### Application HTML Now let's populate the body of index.html. We'll need an `` for creating new todos, a `