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 in-depth background, you might want to refer to some of the books listed in the Preface. This appendix provides a short overview on getting started with Node.js and a short refresher on the role of Underscore and jQuery.
Installing Node
Node.js is based on Google’s V8 library, 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 run the following:
$ brew upgrade $ brew install node
Alternatively, you can visit the download page.
Here, you also find the Node versions for Windows and source code packages.
If you are running an Ubuntu or Debian flavor 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 (e.g., if you are dealing with constraints in production), you might want to have a look at NVM. With NVM, you can easily switch between versions of Node.js.
Getting Functional with Underscore.js
Because JavaScript in its old standard didn’t have helpers for dealing with enumerators, Underscore.js was born. Underscore.js provides many nifty JavaScript shortcuts ...
Get Full Stack Web Development with Backbone.js now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.