-
install (nodejs)[http://nodejs.org/]
-
install the server dependencies: cd bb-training npm install -g grunt-cli npm install
-
launch the server: grunt goto localhost:3000
-
create a view arround the #todoapp el this view should listen to the enter key press create a todos collection and a the newly created item add a li in the #todo-list representing this model tips: $('#stats-template').html() get the template content _.template compiles it
-
create a view for each todo model to handle individual events move the li templating to this view append this view el to its parent destination tips: the attribute tagName defines the root node of the view
-
in this new view, handle the click on .toggle by changing a model attribute render the view on the model change event to reflect the status of the todo tips: every backbone component have a this.listenTo(emitter, 'event', action) method
-
add the delete action add the edit action (with li class .editing), the input should appear with the existing value
-
in the parent view, add a footer showing how many todos are completed and remaining add the 'clear completed' action add the 'all done' action (clicking on the double arrow above chekmarks)
-
change the hashtag in the history when clicking on 'active', 'completed' or 'all' add a router to capture this change filter the view with only the 'active' todo or 'completed' todos tips: Backbone.history.navigate('url', {trigger: true})
-
add requirejs to the index.html transform every file into a module with the define method add a require method with the dependencies tips: //requirejs.org/docs/api.html#config-shim
-
extract each template to one file in a js/templates folder
-
verify everything is working
-
create a grunt task to create a minified version replace the actual script in index.html with the minified one verify things are still ok
-
create a collection of todos and assert filters are working
-
create an item view with a model and assert render returns the correct html
-
do the same with a collection view
-
on this collection view, assert its behavior (when a model is checked, edited, deleted, etc)
-
make the first todo view read only using inheritance
-
create a unique instance of the todos collection for the all app
-
validate each todo title do not contains those characters ! # $ % & and display an error
-
create a default error handler for every failing server request
-
using jQuery.ui, make the todos sortable (their order can be changed with drag&drop)
-
show the input:search on top of the index.html file on every character, filter the todos on their value
-
show the pagination at the bottom of the index.html file instead of getting every todos, get them 10 by 10 and paginate store the pagination in the url
-
replace the templating engine with handlebars and create a helper to capitalize every first letter