This document discusses Node.js and its suitability for web development. It describes Node.js as a platform built on Chrome's JavaScript runtime that uses non-blocking I/O and event-driven programming to enable fast and scalable network applications. The document emphasizes Node.js' focus on I/O-bound real-time applications and lists some of its capabilities like serving files and forms, server-side mashups, writing files, HTTP authentication, sockets programming, and MVC routing with many available libraries to support development.
Using APIs to Create an Omni-Channel Retail Experience
Essential Node.js for Web Developers from Developer Week 2013
1. Essential Node for Web Developers
Mike Amundsen
Principal API Architect
Layer 7 Technologies
@mamund
1
2. Preliminaries
Mike Amundsen
Web Architect, Author, Presenter
Software Explorer
Principal API Architect, Layer 7 Technologies
2
3. Last Project
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.
3
4. Next Project
RESTful Web APIs (Summer 2013)
Co-author with Leonard Richardson
Follow up to Richardson/Ruby’s RESTful Web Services (2007)
Focus on scaling up application-level interoperability with hypermedia
Beyond HTML, XML, and JSON is …
4
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
6
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
7
8. Eric S. Raymond's Design Rules
"Rule of Diversity: Distrust all claims for one true way"
-- Eric S. Raymond
8
10. Essentially, Node is...
"...a platform built on Chrome's JavaScript runtime for
easily building fast, scalable network applications."
10
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
11
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."
12
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)
13
14. But does it run on my machine?
"To build a diverse open source
community, you need a wide
platform," - Paul Querna,
Rackspace
14
29. Bottom Line…
While Node *is* Javascript, the ethos is closer to C/Unix
Don’t get tied up in the “Evented IO” stuff; just write your code and enjoy
Async is the future; learn to love the future.
Get to know the NPM library; lots of good stuff there.
Check out Shelly Power’s “Learning Node” book
29