During AngelHack, more details in my previous blog post, I struggled to find simple BackboneJS Boilerplate to start building our fashion prototype quickly.
If you are not familiar with BackboneJS it is a very powerful MVC framework for building thick client applications. It has fully RESTful API support via it’s model methods. So after half an hour of going through Backbone Boilerplate and other samples and tutorials I ended up using Sample App with Backbone.js and Twitter Bootstrap as a foundation.
So after this experience I decided to come up with my own super simple BackboneJS boilerplate or starter kit. It has bare minimum but all the necessary components:
- RequireJS 2.0.2 included in /libs
- RequireJS Text plug-in 2.0.0 included in /libs
- jQuery 1.7.2 hot-linked from Google APIs
- Backbone 0.9.2 hot-linked from CDNJS
- Underscore 1.3.3 hot-linked from CDNJS
- Twitter Bootstrap 2.0.4 included in /css, /img, /js
To make it work just download zip or fork and clone it from GitHub.com: https://github.com/azat-co/super-simple-backbone-starter-kit. Then launch index.html in your favorite HTTP web server.
It’s a single-file application. Everything Backbone related is in app.js. Templates are in separate files and loaded via RequireJS, and Text plug-in for RequireJS.