Chapter 1. The Bigger Picture
The goal of this first chapter is to provide an introduction to the Backbone.js application environment. It focuses mainly on packages of JavaScript, how to fetch these from the command line, and how to bundle many JavaScript files into one single file.
To learn about the ideas behind Backbone.js, you want to manage as few abstractions as possible. This is why we’ll use Node and the command line as our main working environment for the first few chapters. Later in this book, you will meet Yeoman, RequireJS, and Grunt, which automate workflow for JavaScript projects.
If you prefer to skip the command-line ideas for now, and you want to get started with the browser and UX topics directly, you might want to read Chapter 2 first. However, you should return to this chapter afterward so that you can learn more about JavaScript modules and bundling JavaScript for the browser.
In sum, the goal in this chapter is to enter development with JavaScript modules, and we will touch on the following:
-
Getting Backbone.js via
npm, via a content delivery network (CDN) or from the project site - Basic bundling of JavaScript applications with Browserify and Stitch
- Common use cases for the CommonJS module format
Before You Get Started
Before you can build Backbone.js applications, it is very important that you know some basic abstractions to work with multiple JavaScript files at once.
There are two reasons:
- You will need to fetch a number of JavaScript dependencies to get going ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access