Skip to content
You are not logged in |Login  
     
Limit search to available items
Record:   Prev Next
Resources
More Information
Bestseller
BestsellerE-book
Author Casciaro, Mario, author.

Title Node.js design patterns : design and implement production-grade Node.js applications using proven tatterns and techniques / Mario Casciaro, Luciano Mammino.

Publication Info. Birmingham : Packt Publishing, 2020.

Item Status

Edition Third edition.
Description 1 online resource
Note Includes index.
Contents Cover -- Copyright -- Packt Page -- Contributors -- Table of Contents -- Preface -- Chapter 1: The Node.js Platform -- The Node.js philosophy -- Small core -- Small modules -- Small surface area -- Simplicity and pragmatism -- How Node.js works -- I/O is slow -- Blocking I/O -- Non-blocking I/O -- Event demultiplexing -- The reactor pattern -- Libuv, the I/O engine of Node.js -- The recipe for Node.js -- JavaScript in Node.js -- Run the latest JavaScript with confidence -- The module system -- Full access to operating system services -- Running native code -- Summary
Chapter 2: The Module System -- The need for modules -- Module systems in JavaScript and Node.js -- The module system and its patterns -- The revealing module pattern -- CommonJS modules -- A homemade module loader -- Defining a module -- module.exports versus exports -- The require function is synchronous -- The resolving algorithm -- The module cache -- Circular dependencies -- Module definition patterns -- Named exports -- Exporting a function -- Exporting a class -- Exporting an instance -- Modifying other modules or the global scope -- ESM: ECMAScript modules -- Using ESM in Node.js
Named exports and imports -- Default exports and imports -- Mixed exports -- Module identifiers -- Async imports -- Module loading in depth -- Loading phases -- Read-only live bindings -- Circular dependency resolution -- Modifying other modules -- ESM and CommonJS differences and interoperability -- ESM runs in strict mode -- Missing references in ESM -- Interoperability -- Summary -- Chapter 3: Callbacks and Events -- The Callback pattern -- The continuation-passing style -- Synchronous CPS -- Asynchronous CPS -- Non-CPS callbacks -- Synchronous or asynchronous? -- An unpredictable function
Unleashing Zalgo -- Using synchronous APIs -- Guaranteeing asynchronicity with deferred execution -- Node.js callback conventions -- The callback comes last -- Any error always comes first -- Propagating errors -- Uncaught exceptions -- The Observer pattern -- The EventEmitter -- Creating and using the EventEmitter -- Propagating errors -- Making any object observable -- EventEmitter and memory leaks -- Synchronous and asynchronous events -- EventEmitter versus callbacks -- Combining callbacks and events -- Summary -- Exercises -- Chapter 4: Asynchronous Control Flow Patterns with Callbacks
The difficulties of asynchronous programming -- Creating a simple web spider -- Callback hell -- Callback best practices and control flow patterns -- Callback discipline -- Applying the callback discipline -- Sequential execution -- Executing a known set of tasks in sequence -- Sequential iteration -- Parallel execution -- Web spider version 3 -- The pattern -- Fixing race conditions with concurrent tasks -- Limited parallel execution -- Limiting concurrency -- Globally limiting concurrency -- The async library -- Summary -- Exercises
Summary In this book, we will show you how to implement a series of best practices and design patterns to help you create efficient and robust Node.js applications with ease. We start by teaching you how to master the basics of Node.js development, such as its module systems and its event-driven asynchronous programming style. Next, you will learn how ...
Local Note eBooks on EBSCOhost EBSCO eBook Subscription Academic Collection - North America
Subject Node.js.
Node.js
JavaScript (Computer program language)
Internet programming.
Internet programming
JavaScript (Computer program language)
Added Author Mammino, Luciano, author.
Other Form: Print version: Casciaro, Mario Node. js Design Patterns : Design and Implement Production-Grade Node. js Applications Using Proven Patterns and Techniques, 3rd Edition Birmingham : Packt Publishing, Limited,c2020
ISBN 1839210443 (electronic bk.)
9781839210440 (electronic bk.)