Book Review: Professional Node.js

Book Review: Professional Node.js

Professional Node.js book coverProfessional Node.js, written by Pedro Teixeira and published by Wrox, is a well-crafted introduction to writing server-side JavaScript with the Node.js platform.  The book weighs in at 412 pages, yet for a technical book it is written in a clean, crisp style that feel like reading a book half that length.

At the outset, the book wastes a minimum amount of time covering Node installation and JavaScript language basics.  Some may disagree with those choices, but an author has to choose some kind of coherent scope.  There is no shortage of quality core JavaScript books in the marketplace already.  An adequate replacement for one of those would have added several hundred pages to Professional Node.js, and anything short of that would have essentially been filler.  Meanwhile, the Node.js website already offers clear instructions for installation, and that information changes at a pace that is not book-friendly.  I noticed that for at least the Windows platform, the information in this book is already out of date only months after publication.

Over the next one or two hundred pages, Professional Node.js takes you through the core basics of the platform.  Asynchronous flow control, event-driven execution, etc.  Not exactly a full survey of the core API, but rather a focused deep dive on file and networking I/O.  If you’re going to spend most of your time working within a framework such as Express, then it’s overkill.  However, there are many uses of Node outside that box, and this book does a good job covering those fundamentals.

Things do get a bit muddled as Teixeira moves out of core Node and into third-party libraries and frameworks.  Express is so ubiquitous at this point, it might as well be part of Node in same sense that Rails is associated with Ruby.  Professional Node.js has a decent chapter surveying that framework.  There is also good coverage of Socket.IO and real-time applications.

However, the chapter on testing is woefully brief, and focuses exclusively on the “node-tap” utility with no mention of the most popular JavaScript testing frameworks.  More importantly, the chapter on controlling callback flow focuses exclusively on Caolan McMahon’s “async” module.  Granted, there is ongoing debate over whether callbacks are best managed with this sort of approach, or a promises-based library such as Kris Kowal’s “Q“.  The buzz lately seems to shifting toward promises, though.  I did a text search within the e-book, and the word “promise” does not even make a single appearance.  Such a glaring omission illustrates the challenge of writing a book about an immature and quickly-changing platform.

All in all though, the challenges faced here are also faced by any book on the subject.  Professional Node.js does a great a job, and is a solid source for learning the Node. js platform.