small medium large xlarge

Node.js 8 the Right Way: Practical, Server-Side JavaScript That Scales

by

Cover image for Node.js 8 the Right Way

Node.js 8 the Right Way

Practical, Server-Side JavaScript That Scales

by

Node.js is the platform of choice for creating modern web services. This fast-paced book gets you up to speed on server-side programming with Node.js 8, as you develop real programs that are small, fast, low-profile, and useful. Take JavaScript beyond the browser, explore dynamic language features, and embrace evented programming. Harness the power of the event loop and non-blocking I/O to create highly parallel microservices and applications. This expanded and updated second edition showcases the latest ECMAScript features, current best practices, and modern development techniques.

Choose Your Format(s)

  • $19.95 In Stock
    • Beta: What do I get?

  • Ebooks are DRM free.

  • Ebook delivery options.

About this Title

Skill-meter-3-6
Pages: 310 (est)
Published: 2017-10-10
Release: B4.0 (2017-10-10)
ISBN: 978-1-68050-195-7

JavaScript is the backbone of the modern web, powering nearly every web app’s user interface. Node.js is JavaScript for the server. This greatly expanded second edition introduces new language features while dramatically increasing coverage of core topics. Each hands-on chapter offers progressively more challenging topics and techniques, broadening your skill set and enabling you to think in Node.js.

Write asynchronous, non-blocking code using Node.js’s style and patterns. Cluster and load balance services with Node.js core features and third-party tools. Harness the power of databases such as Elasticsearch and Redis. Work with many protocols, create RESTful web services, TCP socket clients and servers, and more. Test your code’s functionality with Mocha, and manage its life cycle with npm. Discover how Node.js pairs a server-side event loop with a JavaScript runtime to produce screaming fast, non-blocking concurrency. Through a series of practical programming domains, use the latest available ECMAScript features and harness key Node.js classes and popular modules. Create rich command-line tools and a web-based UI using modern web development techniques.

Join the smart and diverse community that’s rapidly advancing the state of the art in JavaScript development.

What You Need

  • Node.js 8.x
  • Operating system with bash-like shell
  • ØMQ (pronounced “Zero-M-Q”) library, version 3.2 or higher
  • Elasticsearch version 5.2 or higher
  • jq version 1.5 or higher
  • Redis version 3.2 or higher

Contents & Extracts

This book is currently in beta, so the contents and extracts will change as the book is developed.

  • Preface
  • Getting Up To Speed on Node.js 8
    • Getting Started
      • Thinking Beyond the Web
      • Node.js’s Niche
      • How Node.js Applications Work
      • Aspects of Node.js Development
      • Installing Node.js
    • Wrangling the File System excerpt
      • Programming for the Node.js Event Loop
      • Spawning a Child Process
      • Capturing Data from an EventEmitter
      • Reading and Writing Files Asynchronously
      • The Two Phases of a Node.js Program
      • Wrapping Up
    • Networking with Sockets
      • Listening for Socket Connections
      • Implementing a Messaging Protocol
      • Creating Socket Client Connections
      • Testing Network Application Functionality
      • Extending Core Classes in Custom Modules
      • Developing Unit Tests With Mocha
      • Wrapping Up
    • Connecting Robust Microservices
      • Installing ØMQ
      • Message-Publishing and -Subscribing
      • Responding to Requests
      • Routing and Dealing Messages
      • Clustering Node.js Processes
      • Pushing and Pulling Messages
      • Wrapping Up
  • Working With Data
    • Transforming Data and Continuous Testing
      • Procuring External Data
      • Behavior-Driven Development with Mocha and Chai excerpt
      • Extracting Data from XML with Cheerio
      • Processing Data Files Sequentially
      • Debugging Tests with Chrome DevTools
      • Wrapping Up
    • Commanding Databases
      • Introducing Elasticsearch
      • Creating a Command Line Program in Node.js with Commander
      • Using request to Fetch JSON over HTTP
      • Shaping JSON with jq
      • Inserting Elasticsearch Documents in Bulk
      • Implementing an Elasticsearch Query Command
      • Wrapping Up
  • Creating An Application From the Ground Up
    • Developing RESTful Web Services
      • Advantages of Express
      • Serving APIs with Express
      • Writing Modular Express Services
      • Keeping Services Running with nodemon
      • Adding Search APIs
      • Simplifying Code Flows with Promises
      • Manipulating Documents RESTfully
      • Emulating Synchronous Style with async and await excerpt
      • Providing an Async Handler Function to Express
      • Wrapping Up
    • Creating a Beautiful User Experience
      • Getting Started with webpack
      • Generating Your First webpack Bundle
      • Sprucing Up Your UI with Bootstrap
      • Bringing in Bootstrap JavaScript and jQuery
      • Transpiling with TypeScript
      • Templating HTML With Handlebars
      • Implementing hashChange Navigation
      • Listing Objects in a View
      • Saving Data With a Form
      • Wrapping Up
    • Fortifying Your Application

Author

Jim R. Wilson is a software engineer at Google creating data visualizations on the Big Picture team. He’s contributed to TensorFlow’s visualization suite, TensorBoard, and other open source projects.