Pro Node.js for Developers

Book description

Since it's creation in 2009, Node.js has grown into a powerful and increasingly popular asynchronous-development framework for creating highly-scalable network applications using JavaScript. Respected companies such as Dow Jones and LinkedIn are among the many organizations to have seen Node's potential and adopted it into their businesses.

Pro Node.js for Developers provides a comprehensive guide to this exciting new technology. We introduce you to Node – what it is, why it matters and how to set it up – before diving deeply into the key concepts and APIs that underpin its operation.

Building upon your existing JavaScript skills you'll be shown how to use Node.js to build both Web- and Network-based applications, to deal with data sources, capture events and deal with child processes to create robust applications that will work well in a wide range of circumstances.

Once you've mastered these skills we'll go further, teaching you more advanced software engineering skills that will give your code a professional edge. You'll learn how to create easily reusable modules that will save you time through code reuse, to log and debug your applications quickly and effectively and to write code that will scale easily and reliably as the demand for your application grows.

What you'll learn

  • Install, configure and deploy Node.js apps effectively

  • Understand the Node.js asynchronous programming model in detail

  • Create both web and network-based Node.js applications with ease

  • Learn to work effectively with varied data sources and file types

  • Discover advanced software engineering concepts that will will save you time and promote code reuse

  • Who this book is for

    This book is for developers who already have a working knowledge of JavaScript and are interested in adopting Node.js into their projects. All other concepts will be introduced from first-principals.

    Table of contents

    1. Title Page
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgments
    8. Introduction
    9. CHAPTER 1: Getting Started
      1. The Node Execution Model
      2. Installing Node
      3. The Read-Eval-Print-Loop
      4. Executing Node Programs
      5. Summary
    10. CHAPTER 2: The Node Module System
      1. Installing Packages
      2. The require( ) Function
      3. The package.json File
      4. A Complete Example
      5. Module Authoring
      6. Summary
    11. CHAPTER 3: The Node Programming Model
      1. Asynchronous Programming
      2. Exception Handling
      3. The async Module
      4. Summary
    12. CHAPTER 4: Events and Timers
      1. Event Emitters
      2. Timers and Scheduling
      3. Summary
    13. CHAPTER 5: The Command Line Interface
      1. Command Line Arguments
      2. The Standard Streams
      3. Signal Events
      4. User Environment Variables
      5. Summary
    14. CHAPTER 6: The File System
      1. Relevant Paths
      2. The path Module
      3. The fs Module
      4. Summary
    15. CHAPTER 7: Streams
      1. What Are Streams?
      2. Working with Streams
      3. Readable Streams
      4. Writable Streams
      5. Pipes
      6. File Streams
      7. Compression Using the zlib Module
      8. Summary
    16. CHAPTER 8: Binary Data
      1. An Overview of Binary Data
      2. The Typed Array Specification
      3. Node Buffers
      4. Summary
    17. CHAPTER 9: Executing Code
      1. The child_process Module
      2. Summary
    18. CHAPTER 10: Network Programming
      1. Sockets
      2. Client-Server Programming
      3. Transmission Control Protocol
      4. User Datagram Protocol
      5. Domain Name System
      6. Summary
    19. CHAPTER 11: HTTP
      1. A Basic Server
      2. Anatomy of an HTTP Request
      3. Working with Cookies
      4. Middleware
      5. Issuing HTTP Requests
      6. HTTPS
      7. Summary
    20. CHAPTER 12: The Express Framework
      1. Express Routes
      2. Creating an Express Application
      3. Templating
      4. express-validator
      5. REST
      6. Summary
    21. CHAPTER 13: The Real-Time Web
      1. The WebSockets API
      2. WebSockets in Node
      3. Socket.IO
      4. Summary
    22. CHAPTER 14: Databases
      1. Relational Databases
      2. MySQL
      3. NoSQL Databases
      4. MongoDB
      5. Summary
    23. CHAPTER 15: Logging, Debugging, and Testing
      1. Logging
      2. Debugging
      3. Testing
      4. Summary
    24. CHAPTER 16: Application Scaling
      1. The cluster Module
      2. Scaling Across Machines
      3. Scaling in the Cloud
      4. Summary
    25. APPENDIX A: JavaScript Object Notation
      1. Supported Data Types
      2. Functions for Working with JSON
      3. Summary
    26. Index

    Product information

    • Title: Pro Node.js for Developers
    • Author(s):
    • Release date: November 2013
    • Publisher(s): Apress
    • ISBN: 9781430258605