Skip to content

samerbuna/efficient-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Efficient Node.js: A Beyond-the-Basics Guide

I’ve been using Node.js since its early days, and it has never failed me. With every piece of code I’ve written for Node, my appreciation for it has only increased. With every new skill I’ve developed for Node, I’ve felt the productivity gain.

Node.js is nothing short of revolutionary. It’s a great platform with impressive power. Once you get comfortable with its fundamentals and how it handles asynchrony, the rest is easy. You’ll get better with it quickly, and you’ll be able to build and scale backend services faster than you’d imagine.

This book is my attempt at helping you learn Node.js efficiently. It naturally dips into a few JavaScript concepts, but in general, you need a good basic understanding of the JavaScript language to get the most value out of this book.

If you’re not comfortable working with JavaScript objects, functions, operators, and iterators, reading an introductory book about JavaScript before this book would help.

This is the book that I wished existed when I started learning Node.js. At that time, I was mainly focusing on the frontend. Naturally, this book is a good fit for a frontend developer wanting to expand their experience to the backend.

💡

See the CODE-SNIPPETS file for a list of the book’s executable code snippets.

Why I Wrote This Book

When it comes to learning Node.js, many tutorials, books, and courses tend to focus on the libraries and tools available within the Node.js ecosystem, rather than the Node.js runtime environment itself. They prioritize teaching how to utilize popular Node.js libraries and frameworks, instead of starting from the native capabilities of Node.js.

This approach is understandable because Node.js is a low-level runtime environment. It does not offer comprehensive solutions but rather a collection of small essential modules that makes creating solutions easier and faster. For example, a full-fledged web server will have options like serving static files (like images, CSS files, etc.). With the Node.js built-in http module, you can build a web server that serves binary data, and with the Node.js built-in fs module, you can read the content of a file from the filesystem. You can combine both of these features to serve static assets by using your own JavaScript code. There’s no built-in Node.js way to serve static assets under a web server.

Popular Node.js libraries that are not part of Node.js itself (such as Express.js, Next.js, and many others with .js in their names) aim to provide nearly complete solutions within specific domains. For example, Express.js specializes in creating and running a web server (and serving static assets, and many other neat features). Practically, most developers will not be using Node.js on its own, so it makes sense for educational materials to focus on the libraries offering comprehensive solutions, so learners can skip to the good parts. The common thinking here is that only developers whose job is to write these libraries need to understand the underlying base layer of Node.js.

However, I would argue that a solid understanding of the built-in power of Node.js is essential before utilizing any of its external libraries and tools. Having a deep understanding of Node.js allows developers to make informed decisions when choosing which libraries to use and how to use them effectively. This book is my attempt to prioritize first learning the native capabilities of Node.js and then using that knowledge to efficiently utilize the powerful libraries and tools in its ecosystem.

Contents

  1. Node Fundamentals

  2. Scripts and Modules

  3. Asynchrony and Events

  4. Errors and Debugging

  5. Package Management

  6. Streams

  7. Child Processes

  8. Testing Node

  9. Scaling Node

  10. Practical Node

🔖

If you need this book and you are unemployed, please send me a message on 𝕏 or LinkedIn.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published