Node.js Introduction and Resources
Node.js is an exciting piece of technology. It is changing the way we build web applications, and it has spawned a whole ecosystem of interesting tools for making web development more efficient and more fun.
Sometimes, with new or trendy technology, it can be difficult to figure out the best approach for learning, or the best resources to use. This guide will explain the most important things to know about Node.js and point you to the most useful resources for learning the platform, the most important development tools, and the best ways for keeping up with this technology as it develops.
(If you are looking for a web development framework to use with Node.js, the most popular one is Express.js.)
This event-driven architecture has strengths and weaknesses. It is especially well-suited for real-time, interactive applications — such as multi-user chat. On the other hand, it is poorly optimized for complex calculation and data processing: the single-threaded event loop will hold up the entire application if a single operation takes a long time to complete.
Node.js is also highly modular. This has as much to do with the development culture and ecosystem as it does with Node.js itself. Node.js modules (called "packages") are typically built with small, self-contained bits of functionality and then composed into a larger application. The Node.js community has a "share gleefully" ethos, and it is easier to share and use small modules than large, purpose-built applications.
The most important place to start learning Node.js is the official documentation. But sometimes you need a nice walk-through. The following tutorials should get you going with Node.js right away:
- The Node.js tutorial at Tutorials Point is a bit superficial, but is a clear and easy way to start getting some familiarity with the language; they also have a nice introduction to the Express framework;
- Node.js Tutorial – Step-by-Step Guide For Getting Started provides both a methodical introduction to using Node and a bit of background on how it works and why it's such a cool idea;
- Real-time Web with Node.js is a premium, multi-part course on Node designed to take 6-8 hours to complete; the first lesson is free;
- Node.js Tutorial at the Udemy blog provides an excellent one-sitting tutorial for getting something small, but meaningful, up and running in Node;
- Node.js Tutorials: From Zero to Hero with Nodejs is a four-hour video tutorial that will cover enough Node.js for you to build a basic application;
- Nodeschool is a website and global community for learning Node.js and related technologies; they have a large number of open source tutorials and exercises, plus anetwork of in-person meetings and groups.
- Beginning Node.js (2014), by Basarat Syed is a well-regarded, up-to-date introduction to the platform;
- Node.js in Practice (2014), by Young and Harter, is a collection of Node.js solutions to common problems facing developers;
- What Is Node? (2011), by Brett McLaughlin, is a short Kindle book that covers the essentials of Node.js; this is not the book to read to become a developer, but is very useful if you are a non-developer in a team working with Node.
The following books focus in on one specific aspect of Node.js development:
- Deploying Node.js (2015), by Sandro Pasquali;
- Node.js for Embedded Systems (2016), by Mulder and Breseman;
- Node.js High Performance (2015), by Diogo Resende;
- Secure Your Node.js Web Application: Keep Attackers Out and Users Happy (2016), by Karl Duuna;
- RESTful Web API Design with Node.JS (2016), by Valentin Bojinov.
Npm Resources and Tutorials
The most popular platform for sharing Node.js modules is npm, which is a package manager for Node.js, but which definitely doesn't stand for "Node Package Manager".
- A Beginner's Guide to npm — the Node Package Manager — this tutorial from Sitepoint provides all the practical information you need to use npm effectively, including a lot of usage details that aren't obvious from npm's own documentation;
- Node.js - Npm Tutorial from Tutorials Point provides a quick, clear explanation of how to use npm;
- Creating an NPM Driven Website explains how to build up the needed features of a site by composing a number of smaller modules from npm;
- Creating and Publishing a Node.js Module is a great introduction for developers who want to share their Node.js modules;
- How to Use Npm to Manage Node.js Packages on a Linux Server provides a great overview of npm from a web hosting and systems administration perspective.
Further Reading and Resources
We have more guides, tutorials, and infographics related to coding and development:
- Ubuntu Primer: learn all about this popular Linux distribution.
- Swift Introduction and Resources: this is one of the newest C-like languages. The future of programming? Find out here!
What Code Should You Learn?