This repo contains all the source code for the book Mastering Backbone.js; please not that in each chapter subdirectory you will find the installation instructions for that chapter. If you have any doubt about the source code or the book itself, feel free to ask your question.
The book covers toolset for development and production environments, however it only works on *nix operative systems (linux, Mac OSX). If you are working on Windows I recommend you to install a virtual machine with Ubuntu image.
When I start to play with Backbone was very difficult to me to understand how the Backbone objects and the business logic fits on a medium to large project; I read the documentation and it was easy to understand, but I didn't find anything about how to give structure to my projects.
Then, to better understand how Backbone projects can be structured, I read codes from others, create prototypes and build small applications with Backbone until I feel comfortable with the result. This book will teach you how to apply the best practices and software engineering to your Backbone projects to build maintainable and scalable webapps.
Please note that the book assumes that you already know the basics about Backbone, it does not explain the core concepts of the library, so if you don't know Backbone please read the documentation and/or start with a tutorial.
To run all the code examples you will need to install a version of node 5.2.x or superior in your system. There are many option to do so, if your operative system does not have a package for this version of node consider to use nvm or n.
$ curl -o https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
$ source ~/.nvm/nvm.sh
$ nvm install node 5.2
$ nvm use node 5.2
Follow these steps and you will be done. Please refer to each chapter subdirectory for details about how to run the code.
I forgot to mention something in the text? Don't know where to put a piece of code? Stuck with a concept? A diagram is confusing? Find a mistake?
If you have questions about the text, the source code or whatever, please make a question I will try to answer as soon as possible.
If you find an error, typo, improvements or whatever feel free to make a pull request.