Want more? Subscribe to my free newsletter:

Traceur-TodoMVC - a Backbone.js app written with ES6

August 26, 2013

I'm pleased to present a re-write of the Backbone TodoMVC app using ECMAScript 6 features such as classes, modules and fat-arrow syntax.

Check out the literate version of the source code as we've filled it with helpful comments. The example of how to elegantly use destructuring assignment in const { Model, View, Collection, Router, LocalStorage } = Backbone; is one of my favorites.

[caption id="attachment_5670" align="aligncenter" width="712"]capsA preview of the Docco generated literate source code[/caption]

Our usage of ES6 features is made possible using Google's Traceur compiler. This ES6 implementation was authored by Addy Osmani, Pascal Hartig, Sindre Sorhus, Stephen Sawchuck, Rick Waldron and Domenic Denicola.

You can run the completed app, watch the project repository or look at the original ES5 implementation.