10 Books for the Javascript and Node.js learner

A lo of people ask me how they can get started with javascript and Node.js. Unfortunately, there's no easy way:

I'm gonna learn Javascript? - sorry this doesn't happen (yet)

I'm gonna learn Javascript? - sorry this doesn't happen (yet)

You'll have to resort to the old way of actually reading books and practising. But If like me you think that's a fun proposition, I'm going to list a few books that I've found to be pretty good for starting your JS quest. 

1. Eloquent Javascript - Marijn Haver

This book is a very good introductory piece for people wanting to take their first steps in the javascript. It was originally produced as an online book, and it is available here, so you can get started right away.

People praise this book for being easy to follow. It's written in a tutorial style, so it makes learning feel a bit like a game. The digital version provides interactive examples and a way to play with the code on your browser, so the experience is very hands-on.

If you're going to start somewhere, get started here. 


2. Smashing Node.JS - Guillermo Rauch

If you're a bit more experienced with Javascript, and want to dive straight into node.js, then I recommend this book by the great Argentinian programmer. The author has contributed to some of the most highly used node.js libraries, such as Socket.io and Mongoose, as well as other Open Source projects such as MooTools.

The book provides a plethora of examples, and develops progressively from important notions in javascript to highly sophisticated examples. It will help you learn best practices, write good testable code, work with NoSQL/SQL databases, do things in real time with websockets, create REST APIs... 

Every node.js programmer should own this book and their copy should be very used up.


3. Javascript: The Good Parts - Douglas Crockford

This book has been subject to many a programmer joke - It's unbelievably thin - but it also has gained a bit of a bible-like status amongst Javascript programmers. Mr. Crockford is one of the most highly respected JS programmers in the world, author of the JSLint code quality tool, famous for its unforgiving approach to verification (I've heard some people call it SShint). 

Besides that, this short book will take you through concepts that are at the core of JS mastery. How to use the `new` keyword, how prototypal inheritance works... All useful things to know for your next technical interview.

This book is never far away from me, great as reference and essential in any JS programmers library.  It's available from O'Reilly.


4. Node Cookbook - David Mark Clements

There couldn't be a top ten list about technology books without a 'cookbook' style contender. Recipes are a great format for technology books after all - you usually end up referring to the book when you want to remember how to do something, and following a recipe is easy and fun. 

This book is good for more advanced node.js programmers or people experienced in coding front end javascript who want to make the move to the backend. It has a very good bit about streams, which are all the rage right now. It'll also teach you how to use mongodb, redis and mysql servers with node.

It's available from packt publishing


5. Javascript: The Definitive Guide - David Flanagan

I don't own this book. It's huge, and very old (from 1996), and it's considered the big, fat brother of The Good Parts. This however is the bible of javascript. Six editions later, it remains relevant and unbeaten for technical detail. Everything you might ever want to know about Javascript and you were too afraid to ask in freenode will be here.

Due to its nature, it is more of a reference book rather than a teaching tool. It won't tell you how to write a program, or how to use a function, but it will describe in concise detail how the function works. The section about closures is the best explanation available to date. 

It's age is showing a little bit, but it still remains the definitive guide. However, at almost 60 dollars, there are cheaper ways to learn JS. It's available from O'Reilly


6. Node.js in Practice (WIP) - Alex Young and Mark Harter

This book hasn't been released yet but it's catching a lot of attention. Their publisher, Manning Publications, has provides an Early Access program, so you can read the parts of the book that have been completed, while the rest is being written.

I haven't had access to it yet, but I'm including it in this list because I keep on hearing about it in #node.js and the few that have read it seem to like it very much. The writer, Alex Young, is an avid JS blogger at DailyJS, and his articles are a great starting point to see if you like his writing style, before you consider buying in on the access program.

The book is available from Manning's website 


7. Node.js in Action - Mike Cantelon et. al

This one is good for Ruby and PHP developers that want to start wearing the proverbial skinny jeans of Node.js. After all, Ruby and php are so 2008! With a heavy focus on web development, it covers Connect and express, the most widely used web application frameworks for Node.js.

It's a good all-rounder book, and a great introduction if you know how to build web apps but you feel like you or your tools (PHP and Ruby) are starting to show their age.

It's also available from Manning's website


8. Maintainable Javascript - Nicholas C. Zakas

A collection of best practices on Javascript. You need to be fairly confident with JS to get the most out this book. It will teach you how to set up best practices for your team, how to use code validation tools. It also has opinionated style guidelines, which you may or may not want to adopt.

The book has a section on automated build systems, using Ant, which I think feels a bit outdated. There are tools like Grunt that will do that in a more natural way (at least for JS developers).

It's more of a front end oriented book, but a must have if you're doing JS professionally. 

You can buy it from O'Reilly 


9. Node Starter - Pedro Teixeira

A very short ebook (no print version is available) with all you need to start building basic web application with Node.js. It assumes you've got some experience with frontend Javascript. It's not a very in-depth book, but it's good if you want to pick up node.js for a weekend project.

I particularly like the bit on EventEmmiters, which will save you a lot of trouble when you (undoubtedly) encounter them in the wild.

It's also pretty cheap at about £7 from Packt Publishing


10. Mastering Node.js - TJ Holowaychuck

An open source, and free as in beer book on Node.js. It's available as a github repo, that you can fork and check out, and also available in pdf, epub, mobi and html formats. There is absolutely no excuse for you not to read this book on it's entirety, it's short, up to date and constantly evolving. It comes with code samples and will serve as a perfect introduction to the world of Javascript on the server. 

You can download it now, from here 

[Bonus] Writing Modular JavaScript with AMD, CommonJS and ED Harmony

This isn't a book, more of a very long blog post, but you should definetely read it once you're confident with JS and want to start building big applications. It explains the conventions used in the industry to create reusable modules. Addy Osmani is a great writer and the book is free, so you should definetely read it.


So there you go, you're ready to start learning node.js and javascript. The first and the last book are free, so you can start right now. No excuse, don't put it off, you'll thank me.