This class will not be about the language or handling web requests or making database calls. This class will be about what makes Node special. We'll discover how a single product is revolutionizing the software world and permeating every facet of our development experience.
Most popular languages can be used in many ways: server app, desktop app, console app, build script, REPL, etc. What makes Node different is that it can do one thing the others can't: run in the browser. This is not one more bullet on the feature list, this is a revolution. Let's discover why, together.
- History of Node
- How it works
- Node Package Manager vs NuGet
- Dependency management
- Package.json
- Callbacks vs Promises
- Build a complete app
- Gulp, Grunt
- Express, React, Isomorphic
- Realtime, WebSockets
- MongoDb, OAuth
- Elektron
- Github, TravisCI
- Intro to coding
- Intro to JavaScript
- Opinion free
- Slow paced
- Lecture
We will be using NodeJS v4, which was release very recently. It's the merging of Node and Io.js. This means Node now has official support for ES6, which we will use exclusively.
On OS X things are pretty simple. We'll use Homebrew and Node Version Manager (or nvm) to do the heavy lifting.
I lifted many of these instructions from this great article.
First, let's install Homebrew if you don't have it already.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then let's get nvm.
brew install nvm
We'll need to make a few small edits to our ~/.bash_profile
, ~/.zshrc
, or ~/.profile
.
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
Now we can get the latest version of Node.
nvm install 4.0
TODO - I'll need to figure out the best way to install the latest in Windows. I'm guessing Chocolatey will be my best bet.
- Visual Studio extension
- npm - Node Package Manager
- nvm - Node Version Manager
- webpack - bundling, transpiling, minifying, linting, etc
I'll go over the history of Node and how it came to be. Then describe where it is now and where it's going next. I'll talk about the split into Io.js and their recombination.
I'll talk about what Node is capable of and why it matters.
At the end of the lesson we'll build a simple app.
Check out the slides and the demos.
- npm installs, updates, and removes Node packages.
- nodemon will restart your node server on file changes.
- node-inspector allows debugging your server side JavaScript inside a familiar Chrome Web Tools like environment.
Talk about isomorphic web development and why it's the future.
Check out the slides and the demos.
Node.js and V8 History
Ryan Dahl gives his account of how Node got started.
NDC 2015 - Building Isomorphic Applications in JavaScript - Eirik Langholm Vullum
Great video on the why and how of isomorphic JavaScript apps. The simple code from his video The complex code from his video David Wells Isomorphic React Example This one links to a few more good examples.
What happened to the missing versions
Node jumped from 0.12 all the way to 4.0. Read this article to find out why.