Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Material for the "Understanding the Node.js Platform" class at General Assembly

branch: master
README.md

Course Description

Node.js is an exciting new platform for building web applications in JavaScript. With its unique I/O model, it excels at the sort of scalable and real-time situations we are increasingly demanding of our servers. And the ability to use JavaScript for both the client and server opens up many possibilities for code sharing, expertise reuse, and rapid development.

This class is intended for those with some basic knowledge of JavaScript, interested in an introduction to the Node.js ecosystem and development platform. We'll discuss how to get started with Node, and why you would want to. We'll then explore Node's module and package system, demononstrating several of the more popular and impressive packages that exemplify the type of tasks Node excels at. These include low-level HTTP streaming with the http module, high-level bidirectional websocket communication with socket.io, and server-browser code sharing with browserify, jsdom, and node-canvas.

Event page

Links

Most of these were mentioned during the class or in the discussion afterward.

  • Node.js website: go here to download and install Node
  • Nodejitsu: a great service for very easily deploying your Node code to the cloud.
    • Kitten Game: the kitten game (with websockets) has been deployed to Nodejitsu. It also has homework!
  • Node.js tag wiki on StackOverflow: has a lot of good links for further reading, including to several full-length books (some free).
  • NYC Node.js meetup
  • Packages used in the demos:
    • request (GitHub): a highly-capable helper for making HTTP requests, including easy piping, buffering, and callbacks.
    • ecstatic (GitHub): a simple static file server you can plug into the basic Node HTTP server, as in the demos, or into higher-level frameworks like express or flatiron.
    • github-firehose (GitHub): a small little package transforming the GitHub events API into a EventEmitter. The source code is good reading!
    • socket.io (npm, GitHub): a very high-level web sockets abstraction for bidirectional communication among multiple clients and your server.
    • browserify (GitHub): performs “compilation” of Node-style modules and packages into browser-ready bundles.
    • jsdom (GitHub): a virtual DOM on the server-side.
    • canvas: an implementation of the HTML5 canvas API on the server.
  • Packages discussed or otherwise recommended:
    • express (npm, GitHub): the most popular higher-level framework for writing websites. Gives you thinks like views and routing, as well as the basics like caching or redirection.
    • restify (npm, GitHub): a higher-level framework for writing RESTful APIs, inspired by express.
    • mongoose (npm, GitHub): a client for a MongoDB that will map your models to your database.
    • q (GitHub): implements the promise abstraction in Node, which in my opinion is the best solution for handling asynchronous operations, and especially asynchronous errors.
  • Packages for unit testing:

A Small Plug

I'm giving a talk on unit testing at my HTML5 App Developers meetup next Monday! You should come.

Something went wrong with that request. Please try again.