Node.Js in Practice: Includes 115 Techniques

Alex Young, Marc Harter, Ben Noordhuis

ISBN: 9789351197744

424 pages

INR 899


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. Following a common-sense Problem/Solution format, these experience-fueled techniques cover important topics like event-based programming, streams, integrating external applications, and deployment. The abundantly annotated code makes the examples easy to follow and techniques are organized into logical clusters, so it's a snap to find what you're looking for.


Part 1 Node fundamentals


Chapter 1 Getting started

    1.1 Getting to know Node

    1.2 Building a Node application

    1.3 Summary


Chapter 2 Globals: Node's environment

    2.1 Modules

    2.2 Standard I/O and the console object

    2.3 Operating system and command-line integration

    2.4 Delaying execution with timers

    2.5 Summary


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

    3.1 Changing data encodings

    3.2 Converting binary files to JSON

    3.3 Creating your own binary protocol

    3.4 Summary


Chapter 4 Events: Mastering Event Emitter and beyond

    4.1 Basic usage

    4.2 Error handling

    4.3 Advanced patterns

    4.4 Third-party modules and extensions

    4.5 Summary


Chapter 5 Streams: Node's most powerful and misunderstood feature

    5.1 Introduction to streams

    5.2 Built-in streams

    5.3 Third-party modules and streams

    5.4 Using the stream base classes

    5.5 Advanced patterns and optimization

    5.6 Summary


Chapter 6 File system: Synchronous and asynchronous approaches to files

    6.1 An overview of the fs module

    6.2 Summary


Chapter 7 Networking: Node's true "Hello, World"

    7.1 Networking in Node

    7.2 TCP clients and servers

    7.3 UDP clients and servers

    7.4 HTTP clients and servers

    7.5 Making DNS requests

    7.6 Encryption

    7.7 Summary


8 Child processes: Integrating external applications with Node

    8.1 Executing external applications

    8.2 Executing Node programs 185

    8.3 Working synchronously 192

    8.4 Summary


Part 2 Real-world recipes


Chapter 9 The Web: Build leaner and meaner web applications

    9.1 Front-end techniques

    9.2 Server-side techniques

    9.3 Testing web applications

    9.4 Full stack frameworks

    9.5 Real-time services

    9.6 Summary


Chapter 10 Tests: The key to confident code

    10.1 Introduction to testing with Node

    10.2 Writing simple tests with assertions

    10.3 Test harnesses

    10.4 Test frameworks

    10.5 Tools for tests

    10.6 Further reading

    10.7 Summary


Chapter 11 Debugging: Designing for introspection and resolving issues

    11.1 Designing for introspection

    11.2 Debugging issues

    11.3 Summary


Chapter 12 Node in production: Deploying applications safely

    12.1 Deployment

    12.2 Caching and scaling

    12.3 Maintenance

    12.4 Further notes on scaling and resiliency

    12.5 Summary


Part 3 Writing modules


Chapter 13 Writing modules: Mastering what Node is all about

    13.1 Brainstorming

    13.2 Building out the package.json file

    13.3 The end user experience

    13.4 Publishing

    13.5 Summary