Node.js Design Patterns

Get the best out of Node.js by mastering a series of patterns and techniques to create modular, scalable, and efficient applications

Node.js Design Patterns

Mario Casciaro

1 customer reviews
Get the best out of Node.js by mastering a series of patterns and techniques to create modular, scalable, and efficient applications
Mapt Subscription
FREE
$29.99/m after trial
eBook
$6.00
RRP $29.99
Save 79%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$6.00
$49.99
$29.99p/m after trial
RRP $29.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781783287314
Paperback454 pages

Book Description

Node.js is a massively popular software platform that lets you use JavaScript to easily create scalable server-side applications. It allows you to create efficient code, enabling a more sustainable way of writing software made of only one language across the full stack, along with extreme levels of reusability, pragmatism, simplicity, and collaboration. Node.js is revolutionizing the web and the way people and companies create their software.

In this book, we will take you on a journey across various ideas and components, and the challenges you would commonly encounter while designing and developing software using the Node.js platform. You will also discover the "Node.js way" of dealing with design and coding decisions.

The book kicks off by exploring the fundamental principles and components that define the platform. It then shows you how to master asynchronous programming and how to design elegant and reusable components using well-known patterns and techniques. The book rounds off by teaching you the various approaches to scale, distribute, and integrate your Node.js application.

Table of Contents

Chapter 1: Node.js Design Fundamentals
The Node.js philosophy
The reactor pattern
The callback pattern
The module system and its patterns
The observer pattern
Summary
Chapter 2: Asynchronous Control Flow Patterns
The difficulties of asynchronous programming
Using plain JavaScript
The async library
Promises
Generators
Comparison
Summary
Chapter 3: Coding with Streams
Discovering the importance of streams
Getting started with streams
Asynchronous control flow with streams
Piping patterns
Summary
Chapter 4: Design Patterns
Factory
Proxy
Decorator
Adapter
Strategy
State
Template
Middleware
Command
Summary
Chapter 5: Wiring Modules
Modules and dependencies
Patterns for wiring modules
Wiring plugins
Summary
Chapter 6: Recipes
Requiring asynchronously initialized modules
Asynchronous batching and caching
Running CPU-bound tasks
Sharing code with the browser
Summary
Chapter 7: Scalability and Architectural Patterns
An introduction to application scaling
Cloning and load balancing
Decomposing complex applications
Summary
Chapter 8: Messaging and Integration Patterns
Fundamentals of a messaging system
Publish/subscribe pattern
Pipelines and task distribution patterns
Request/reply patterns
Summary

What You Will Learn

  • Design and implement a series of server-side JavaScript patterns so you understand why and when to apply them in different use case scenarios
  • Understand the fundamental Node.js components and use them to their full potential
  • Untangle your modules by organizing and connecting them coherently
  • Reuse well-known solutions to circumvent common design and coding issues
  • Deal with asynchronous code with comfort and ease
  • Identify and prevent common problems, programming errors, and anti-patterns

Authors

Table of Contents

Chapter 1: Node.js Design Fundamentals
The Node.js philosophy
The reactor pattern
The callback pattern
The module system and its patterns
The observer pattern
Summary
Chapter 2: Asynchronous Control Flow Patterns
The difficulties of asynchronous programming
Using plain JavaScript
The async library
Promises
Generators
Comparison
Summary
Chapter 3: Coding with Streams
Discovering the importance of streams
Getting started with streams
Asynchronous control flow with streams
Piping patterns
Summary
Chapter 4: Design Patterns
Factory
Proxy
Decorator
Adapter
Strategy
State
Template
Middleware
Command
Summary
Chapter 5: Wiring Modules
Modules and dependencies
Patterns for wiring modules
Wiring plugins
Summary
Chapter 6: Recipes
Requiring asynchronously initialized modules
Asynchronous batching and caching
Running CPU-bound tasks
Sharing code with the browser
Summary
Chapter 7: Scalability and Architectural Patterns
An introduction to application scaling
Cloning and load balancing
Decomposing complex applications
Summary
Chapter 8: Messaging and Integration Patterns
Fundamentals of a messaging system
Publish/subscribe pattern
Pipelines and task distribution patterns
Request/reply patterns
Summary

Book Details

ISBN 139781783287314
Paperback454 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mastering Web Application Development with AngularJS Book Cover
Mastering Web Application Development with AngularJS
$ 26.99
$ 5.40
MEAN Web Development Book Cover
MEAN Web Development
$ 29.99
$ 3.00
AngularJS Web Application Development Blueprints Book Cover
AngularJS Web Application Development Blueprints
$ 29.99
$ 21.00
Mastering Node.js Book Cover
Mastering Node.js
$ 29.99
$ 6.00
Object-Oriented JavaScript - Second Edition Book Cover
Object-Oriented JavaScript - Second Edition
$ 29.99
$ 21.00
AngularJS Web Application Development Cookbook Book Cover
AngularJS Web Application Development Cookbook
$ 29.99
$ 6.00