Skip to Main Content
Getting Started with GEO, CouchDB, and Node.js
book

Getting Started with GEO, CouchDB, and Node.js

by Mick Thompson
July 2011
Beginner content levelBeginner
66 pages
1h 19m
English
O'Reilly Media, Inc.
Content preview from Getting Started with GEO, CouchDB, and Node.js

Chapter 1. Node.js

Node.js has quickly become a very popular asynchronous framework for JavaScript. It is built on top of the same V8 engine that the Chromium and Google Chrome web browsers use to interpret JavaScript. With the addition of networking and file system API support, it has quickly proved to be a capable tool for interacting with IO in a asynchronous way.

There are many other libraries in several other languages that can accomplish the same asynchronous handling of IO. There are different conventions, schools of thought, and preferences of developers. Node.js uses callbacks for the developer to notified of the progress of asynchronous operations. Callbacks are nothing new for developers accustom to Python’s Twisted library or other similar frameworks. Callbacks can be a very easy and powerful way to manage the flow of an appilication, but as with anything new they also offer an opportunity to trip up a developer. The first thing to keep in mind when getting started with asynchronous development is that execution might not follow the same squence every time.

Getting Started with Node.js

In order to install Node.js, download the source and build it. The main Node.js web page at http://nodejs.org can be very helpful in linking to downloads, source code repositories, and documentation. The master branch of the repository is kept in a semi-unstable state, so before building check out the most recent tagged version. For example: v0.4.9.

Note

The Node.js package manager or NPM is ...

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.
Start your free trial

You might also like

HTML5 Geolocation

HTML5 Geolocation

Anthony T. Holdener
Scaling CouchDB

Scaling CouchDB

Bradley Holt
9 Practical Node.js Projects

9 Practical Node.js Projects

James Hibbard, James Kolce, Lukas White, Jeremy Wilken, Simon Holmes, Michael Wanyoike, Paul Orac, Patrick Catanzariti

Publisher Resources

ISBN: 9781449311230Errata Page