Skip to content

Latest commit

 

History

History
64 lines (49 loc) · 3.15 KB

node-js.md

File metadata and controls

64 lines (49 loc) · 3.15 KB

Getting Started with Node.js

Projected Time

90 minutes

Prerequisites

  • JavaScript I - VI lessons
  • How the Internet Works
  • AJAX
  • Git and Version Control
  • jQuery

Motivation

This lab exercise will introduce Node.js, a powerful JavaScript library that creates a webserver. This is the missing link between local deployment for development purposes and deploying a website so others can access it on the Internet.

Objectives

Participants will be able to:

  • Download and install Node.js
  • Run commands in the Node.js REPL
  • Explain non-blocking I/O
  • Explain (a)synchronous calls
  • Explain event-driven programming

Specific Things To Teach

  • The main features of Node (ie: what makes Node, Node?)
  • Blocking vs. non-blocking I/O
  • Synchronous vs. asynchronous calls
  • Why a developer might choose Node.js over other web frameworks
  • Well-known companies that use Node.js

Materials

Lesson

Common Mistakes / Misconceptions

  • Node.js is not a framework, it's a runtime environment for JavaScript and a JavaScript library
  • Many developers think Node.js is more complicated to use than other popular web frameworks. Node.js is not necessarily more complicated to use, but it does require the developer to think about web servers differently than they do when using a web framework like Python's Django or Ruby's Rails.

Independent Practice

Check for Understanding

After the lab exercise, participants should write down in their own words the steps they went through to create this basic web app using Node. It should be of good quality so they can refer to it later.

Participants should take turns in their pairs reading through and interpreting the app.js file line by line.

After reading through app.js in pairs, each participant should read through the file with a member of Techtonica staff.