Author: Pedro Teixeira
Reviewer: Ian Elliot
Node.js seems to be growing in importance and we need some good book to tell us what it is all about. Is Professional Node.js the one you need?
This is a very strange book. It does cover all of Node.js but it does it in what might appear to be a strange order. It also tends to explain simple things in very academic ways. For example, callbacks are introduced as continuation style passing and simple event handlers are part of the event emitter pattern. None of this is wrong, well callbacks are actually not quite proper continuation style passing, but it isn't particularly helpful. The beginner is just going to be confused and the expert doesn't need it.
Part II is about the core API. It starts with loading and creating modules - which is a strange place to start given we still haven't seen even a modest Node.js example. By this point in the book the presentation has settled down into very small chapters with a short explanation, short example and short summary. It reads more like a manual than a book trying to get you to understand the principles of Node.js.
From here we have a set of chapters that introduce HTTP servers,TCP clients, HTTP requests and UDP. The section closes with a look at security - using TLS/SSL and HTTPS. This part of the book should prove useful to the majority of readers. My advice is to skim read the first 80 pages and get to the meat then go back and check anything you need extra. The book still tends to be overly abstract. For example the chapter on making HTPP Requests starts:
"HTTP has become a central part of the infrastructure of many private and public services on the Internet. Not only used to serve static content, HTTP have become the preferred way of serving and consuming public facing API calls."
Yes all correct, but a bit overly stiff and formal. It is also makes it harder to get the bigger picture.
Part IV is about building and debugging modules and applications. We go over testing, debugging and eventually get to using the async library.
Then on to Part V on web applications using two libraries - Express.js and Connect. Its final chapter deals with socket.io.
Part VI is on connecting to databases with a chapter on each of MySQL, CouchDB and MongoDB. The examples get bigger as the book progresses, but they are still easy enough to follow.
Overall this is quite a good book but with a few small flaws. The biggest flaw is the tendency to resort to the academic approach before explaining the simple practical examples. It also manages to avoid getting into the core of Node.js until about 100 pages in - if you don't already know something about Node.js this might be confusing. The book tends to get better as it progresses and gets into more difficult subject matter.
This isn't the essential book on Node.js, but it might suit you if you prefer things presented in short chunks and as long as you can see through some of the slightly strange abstract presentations to the practical stuff lurking beneath.