Book Detail : Node.js in Practice

Book Title: 
Node.js in Practice
Resource Category: 
Publisher: 
Publication Year: 
2 014
Number of Pages: 
424
ISBN: 
978-1-61729-093-0
Language: 
English
WishList: 
yes
Available at Shelf: 
No
Description: 

Node.js in Practice is a collection of 115 thoroughly tested examples and instantly useful techniques guaranteed to make any Node application go more smoothly.

Table of Contents (Summary): 

Part 1: Node fundamentals

1. Getting started

2. Globals: Node’s environment

3. Buffers: Working with bits, bytes, and encodings

4. Events: Mastering EventEmitter and beyond

5. Streams: Node’s most powerful and misunderstood feature

6. File system: Synchronous and asynchronous approaches to files

7. Networking: Node’s true “Hello, World”

8. Child processes: Integrating external applications with Node

Part 2: Real-world recipes

9. The Web: Build leaner and meaner web applications

10. Tests: The key to confident code

11. Debugging: Designing for introspection and resolving issues 

12. Node in production: Deploying applications safely

Part 3: Writing modules

13. Writing modules: Mastering what Node is all about

Appendix: Community

Index

Table of Contents (Expanded): 

Part 1: Node fundamentals

1. Getting started

  • Getting to know Node

    • Why Node?

    • Node’s main features

  • Building a Node application

    • Creating a new Node project

    • Making a stream class

    • Using a stream

    • Writing a test

  • Summary

2. Globals: Node’s environment

  • Modules 16

    • TECHNIQUE  1 Installing and loading modules 

    • TECHNIQUE  2 Creating and managing modules 

    • TECHNIQUE  3 Loading a group of related modules

    • TECHNIQUE  4 Working with paths

  • Standard I/O and the console object 

    • TECHNIQUE  5 Reading and writing to standard I/O

    • TECHNIQUE  6 Logging messages 

    • TECHNIQUE  7 Benchmarking a program 

  • Operating system and command-line integration 

    • TECHNIQUE  8 Getting platform information 

    • TECHNIQUE  9 Passing command-line arguments 

    • TECHNIQUE  10 Exiting a program 

    • TECHNIQUE  11 Responding to signals 

  • Delaying execution with timers 

    • TECHNIQUE  12 Executing functions after a delay with set Timeout 

    • TECHNIQUE  13 Running callbacks periodically with timers 

    • TECHNIQUE  14 Safely managing asynchronous APIs 

    • Summary 

3. Buffers: Working with bits, bytes, and encodings

  • Changing data encodings 

    • TECHNIQUE  15 Converting buffers into other formats 

    • TECHNIQUE  16 Changing string encodings using buffers 

  • Converting binary files to JSON 

    • TECHNIQUE  17 Using buffers to convert raw data 

  • Creating your own binary protocol 

    • TECHNIQUE  18 Creating your own network protocol 

  • Summary 

4. Events: Mastering EventEmitter and beyond

  • Basic usage 

    • TECHNIQUE  19 Inheriting from EventEmitter 

    • TECHNIQUE  20 Mixing in EventEmitter 

  • Error handling 

    • TECHNIQUE  21 Managing errors 

    • TECHNIQUE  22 Managing errors with domains 

  • Advanced patterns 

    • TECHNIQUE  23 Reflection 

    • TECHNIQUE  24 Detecting and exploiting EventEmitter 

    • TECHNIQUE  25 Categorizing event names 

  • Third-party modules and extensions 

    • TECHNIQUE  26 Alternatives to EventEmitter

  • Summary 

5. Streams: Node’s most powerful and misunderstood feature

  • Introduction to streams 

    • Types of streams

    • When to use streams

    • History Streams in third-party modules

    • Streams inherit from EventEmitter

  • Built-in streams 

    • TECHNIQUE  27 Using built-in streams to make a static web server 

    • TECHNIQUE  28 Stream error handling 

  • Third-party modules and streams 

    • TECHNIQUE  29 Using streams from third-party modules

  • Using the stream base classes 

    • TECHNIQUE  30 Correctly inheriting from the stream base classes 

    • TECHNIQUE  31 Implementing a readable stream 

    • TECHNIQUE  32 Implementing a writable stream 

    • TECHNIQUE  33 Transmitting and receiving data with duplex streams 

    • TECHNIQUE  34 Parsing data with transform streams 

  • Advanced patterns and optimization

    • TECHNIQUE  35 Optimizing streams 

    • TECHNIQUE  36 Using the old streams API

    • TECHNIQUE  37 Adapting streams based on their destination 

    • TECHNIQUE  38 Testing streams 

  • Summary 

6. File system: Synchronous and asynchronous approaches to files

  • An overview of the fs module

    • POSIX file I/O wrappers

    • Streaming

    • Bulk file I/O

    • File watching

    • Synchronous alternatives

    • TECHNIQUE  39 Loading configuration files 

    • TECHNIQUE  40 Using file descriptors 

    • TECHNIQUE  41 Working with file locking 

    • TECHNIQUE  42 Recursive file operations 

    • TECHNIQUE  43 Writing a file database 

    • TECHNIQUE  44 Watching files and directories 

  • Summary

7. Networking: Node’s true “Hello, World”

  • Networking in Node

    • Networking terminology

    • Node’s networking modules

    • Non-blocking networking and thread pools

  •  TCP clients and servers 

    • TECHNIQUE  45 Creating a TCP server and tracking clients 

    • TECHNIQUE  46 Testing TCP servers with clients 

    • TECHNIQUE  47 Improve low-latency applications 

  • UDP clients and servers 

    • TECHNIQUE  48 Transferring a file with UDP

    • TECHNIQUE  49 UDP client server applications 

  • HTTP clients and servers 

    • TECHNIQUE  50 HTTP servers

    • TECHNIQUE  51 Following redirects 

    • TECHNIQUE  52 HTTP proxies 

  • Making DNS requests 

    • TECHNIQUE  53 Making a DNS request

  • Encryption 

    • TECHNIQUE  54 A TCP server that uses encryption 

    • TECHNIQUE  55 Encrypted web servers and clients 

  • Summary

8. Child processes: Integrating external applications with Node

  • Executing external applications

    • TECHNIQUE 56 Executing external applications

      • Paths and the PATH environment variable

      • Errors when executing external applications

    • TECHNIQUE  57 Streaming and external applications

      • Stringing external applications together

    • TECHNIQUE  58 Executing commands in a shell

      • Security and shell command execution

    • TECHNIQUE  59 Detaching a child process

      • Handing I/O between the child and parent processes

      • Reference counting and child processes

  • Executing Node programs

    • TECHNIQUE  60 Executing Node programs 

    • TECHNIQUE  61 Forking Node modules 

    • TECHNIQUE  62 Running jobs 

  • Working synchronously

    • TECHNIQUE  63 Synchronous child processes 

  • Summary

Part 2: Real-world recipes

9. The Web: Build leaner and meaner web applications

  • Front-end techniques 

    • TECHNIQUE  64 Quick servers for static sites 

    • TECHNIQUE  65 Using the DOM in Node 

    • TECHNIQUE  66 Using Node modules in the browser 

  • Server-side techniques 

    • TECHNIQUE  67 Express route separation 

    • TECHNIQUE  68 Automatically restarting the server

    • TECHNIQUE  69 Configuring web applications 

    • TECHNIQUE  70 Elegant error handling 

    • TECHNIQUE  71 RESTful web applications 

    • TECHNIQUE  72 Using custom middleware 

    • TECHNIQUE  73 Using events to decouple functionality 

    • TECHNIQUE  74 Using sessions with WebSockets 

    • TECHNIQUE  75 Migrating Express 3 applications to Express 

  • Testing web applications 

    • TECHNIQUE  76 Testing authenticated routes 

    • TECHNIQUE  77 Creating seams for middleware injection 

    • TECHNIQUE  78 Testing applications that depend on remote services 

  • Full stack frameworks 

  • Real-time services 

  • Summary 

10. Tests: The key to confident code

  • Introduction to testing with Node 

  • Writing simple tests with assertions 

    • TECHNIQUE  79 Writing tests with built-in modules 

    • TECHNIQUE  80 Testing for errors 

    • TECHNIQUE  81 Creating custom assertions 

  • Test harnesses

    • TECHNIQUE  82 Organizing tests with a test harness 

  • Test frameworks 

    • TECHNIQUE  83 Writing tests with Mocha 

    • TECHNIQUE  84 Testing web applications with Mocha 

    • TECHNIQUE  85 The Test Anything Protocol 

  • Tools for tests

    • TECHNIQUE  86 Continuous integration 

    • TECHNIQUE  87 Database fixtures 

  • Further reading 

  • Summary 

11. Debugging: Designing for introspection and resolving issues 

  • Designing for introspection

    • Explicit exceptions

    • Implicit exceptions

    • The error even

    • The error argument

    • TECHNIQUE  88 Handling uncaught exceptions 

    • TECHNIQUE  89 Linting Node applications 

  • Debugging issues 

    • TECHNIQUE  90 Using Node’s built-in debugger 

    • TECHNIQUE  91 Using Node Inspector 

    • TECHNIQUE  92 Profiling Node applications 

    • TECHNIQUE  93 Debugging memory leaks 

    • TECHNIQUE  94 Inspecting a running program with a REPL 

    • TECHNIQUE  95 Tracing system calls 

  • Summary 

12. Node in production: Deploying applications safely

  • Deployment 

    • TECHNIQUE  96 Deploying Node applications to the cloud 

    • TECHNIQUE  97 Using Node with Apache and nginx 

    • TECHNIQUE  98 Safely running Node on port 80 

    • TECHNIQUE  99 Keeping Node processes running 

    • TECHNIQUE  100 Using WebSockets in production 

  • Caching and scaling 

    • TECHNIQUE  101 HTTP caching 

    • TECHNIQUE  102 Using a Node proxy for routing and scaling 

    • TECHNIQUE  103 Scaling and resiliency with cluster 

  • Maintenance 

    • TECHNIQUE  104 Package optimization 

    • TECHNIQUE  105 Logging and logging services

  • Further notes on scaling and resiliency 

  • Summary

Part 3: Writing modules

13. Writing modules: Mastering what Node is all about

  • Brainstorming

    • A faster Fibonacci module 

    • TECHNIQUE  106 Planning for our module 

    • TECHNIQUE  107 Proving our module idea 

  • Building out the package.json file 

    • TECHNIQUE  108 Setting up a package.json file 

    • TECHNIQUE  109 Working with dependencies 

    • TECHNIQUE  110 Semantic versioning 

  • The end user experience 

    • TECHNIQUE  111 Adding executable scripts

    • TECHNIQUE  112 Trying out a module 

    • TECHNIQUE  113 Testing across multiple Node versions 

  • Publishing 

    • TECHNIQUE  114 Publishing modules 

    • TECHNIQUE  115 Keeping modules private 

  • Summary 

Appendix: Community

Index

2.5
Average: 2.5 (177 votes)

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!