essential node for web developers - o'reilly mediaassets.en.oreilly.com/1/event/80/essential...
TRANSCRIPT
1 1
Essential Node for Web Developers Mike Amundsen
Principal API Architect
Layer 7 Technologies
@mamund
2 2
Mike Amundsen
Web Architect, Author, Presenter
Software Explorer
Principal API Architect, Layer 7 Technologies
Preliminaries
3 3
Building Hypermedia APIs w/ HTML5 & Node (November 2011)
Methodology for writing/maintaining business-level APIs in the cloud.
Real solutions for real use-cases.
Three Servers, Six Clients, 200+ pages.
Last Project
4 4
Programming the Web w/ HTML5 & Node (November 2012?)
User’s Manual for Cloud-based developers.
I put myself on a six month diet of Chromebook-only development
Design, code, source control, collaborate, test, & deploy
All from the Chromebook, all to the cloud.
Next Project
5 5
Let's start with a bit of
Philosophy...
6 6
Unix Philosophy
Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams.
- Douglas McIlroy
7 7
Node Philosophy (possible)
• Write modules that do one thing and do it well.
• Write modules to work together.
• Write modules to handle streams and events
8 8
Eric S. Raymond's Design Rules
"Rule of Diversity: Distrust all claims for one true way"
-- Eric S. Raymond
9 9
Reminder:
My Examples
are NOT
the
"One True Way"
10 10
Essentially, Node is...
"...a platform built on Chrome's JavaScript runtime for
easily building fast, scalable network applications."
11 11
Node is…
“Node is intended to be a very low-level library that
facilitates higher-level extensions and abstractions in
userland. It is more like C than it is like Python, and that is
by design.” – Isaac Schlueter
12 12
And it's different because....
"Node.js uses an event-driven, non-blocking I/O model that
makes it lightweight and efficient, perfect for data-
intensive real-time applications that run across distributed
devices."
13 13
So that means....
"Most of the applications we're writing today are heavily
I/O bound. Because of the event-driven nature of
JavaScript (and Node by extension), whatever you write
with it is going to be very fast." - Guillermo Rauch
(socket.io)
14 14
But does it run on my machine?
"To build a diverse open source
community, you need a wide
platform," - Paul Querna,
Rackspace
15 15
Essential NodeJS on a single slide (well, almost)
16 16
Ok, introduce me then...
17 17
Hello, Node!
18 18
Ok, but how do I deliver files?
19 19
Not bad; how about HTML Forms?
20 20
Cool. Now how about a mash-up?
21 21
Yeah, but how do you write files?
22 22
What about HTTP Authentication?
23 23
Ok, but where's that "sockets" stuff?
24 24
Alright, how about MVC & routing?
25 25
Hey, this is all 'async' & hard, right?
26 26
So are there lots of libraries?
27 27
So are there lots of libraries?
28 28
So....
29 29
Node.js...
• “Low-level” Javascript
• Non-blocking I/O
• Cross Platform
• Pages, Forms, Services, APIs, Sockets
• MVC, Templates, ...
• 1000s of available libraries
• All Open Source
Oh yeah, one more question...
30 30
Why not join the hipster Nod-ies?
31 31
Essential Node for Web Developers Mike Amundsen
Principal API Architect
Layer 7 Technologies
@mamund