This book provides an environment for editing and running Backbone code as you learn, and the goal of the interactive examples is to let you gain experience with Backbone and CoffeeScript without requiring you to set up your own environment. However, the sooner you release your own Backbone applications into the wild, the better.

The goal of this chapter is to provide a guide to using Backbone in the real world. After covering the basics of getting started with both Backbone and CoffeeScript, we will then discuss the more advanced topics of how to organize your application and package it for delivery to the client.

If you feel that you would rather come back to this chapter after spending some more time learning about Backbone through the interactive examples in this book, you can safely skip ahead to the chapter on Models and Domain Logic. On the other hand, if your current concern is the actual mechanics of introducing Backbone into a Web page, you're in the right place.

Getting Started

All it takes to get started with Backbone is a few JavaScript files, a text editor, and a browser. CoffeeScript is a bit more involved, however, since it requires a JavaScript-based compiler that is typically executed independently of the browser. Let's tackle it first.


The rest of this chapter is part of the interactive book Backbone + CoffeeScript.