On completion of this course, students will be able to:
- Clearly understand the platform design choices that led to Node.js choosing an event loop and what this means for applications built on that foundation.
- Understand the unique trade-offs present in event-driven programming.
- Create Node.js modules and express code modularity in an application.
- Understand the core flow control patterns in Node.js and know when it is appropriate to use callbacks, event emitters or streams.
- Create and manipulate buffers efficiently.
- Understand how to manage error state and know when a process should exit due to an error.
- Build network applications with Node.js.
Intro to Node.jsRAM vs. I/O latency
- Blocking vs. Non-Blocking
- Event-driven Programming
- Event Loop
- Blocking The Event Loop
- Node.js Philosophy (userland vs. core)
Installing Node.jsDownload and Install
- Node REPL
- First Hello World
- References (API docs, Mailing List, etc…)
Modules and npmAnatomy of a module
- Private code
- Accessing and using modules
- npm commands
The Callback PatternWhat are callbacks
- When to use Event Emitters
- Binding Functions to Events
- Creating an Event Emitter
- Callbacks: Error-first
- Errors in Event Emitters
- Uncaught Exceptions
- Using Domains
- Why Buffers exist
- Creating Buffers
- Reading Buffers
- Writing Buffers
- Manipulating Buffers
- What are streams
- Read Stream API
- Write Stream API
- Flow Control
- Duplex Stream
- Transform Stream