O'Reilly logo

Full Stack Web Development with Backbone.js by Patrick Mulder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Developing with JavaScript

For client-side application development, a good understanding of JavaScript is necessary. JavaScript is a dynamic, object-oriented language. For an indepth background, you might want to refer some of the books listed in the references. This Appendix gives some short overview on getting started with Node.js, and a short refresher on the role Underscore and jQuery.

Installing Node

Node.js is based on the V8 library by Google which is written in C++. Node.js runs on all major operating systems.

Starting with Mac OS, an easy approach to install Node.js is by using Homebrew. Homebrew is a package manager for Mac OS (see http://brew.sh/ for basic installation instructions).

Once Homebrew is installed, you can do:

$ brew upgrade
$ brew install node

Alternatively, you can visit the download page: http://nodejs.org/download/

Here, you also find the Node versions for Windows and source code packages.

If you are running an Ubuntu or Debian flavour of Linux, you can install Node.js with:

sudo apt-get install build-essential libssl-dev curl git-core
sudo apt-get install nodejs

If you need to run different versions of Node.js, since you are dealing with constraints in production for example, you might want to have a look at NVM: https://github.com/creationix/nvm . With NVM, you can easily switch between versions of Node.js

Getting Functional with Underscore.js

Since JavaScript in its old standard didn’t have helpers for dealing with enumerators, Underscore.js was born. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required