Professional Node.js

Author: Pedro Teixeira
Publisher: Wrox
Pages: 408
ISBN: 978-1118185469
Audience: Intermediate JavaScript programmers
Rating: 3.5
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. 

 

Banner

 

The book is divided into six parts and as you might expect Part I deals with the basics of what Node.js is and how to set it up. Oddly, given it's the part about what makes Node.js important, it doesn't mention its approach to building a web or any other type of server. What we have is an introduction to Node.js as if it had invented event driven programming. Of course, most JavaScript programmers coming from the client side will find the event driven approach nothing but natural. 

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.

Chapter 5 is about buffers and again this really should have come later in the book. Chapter 6 is about using the event emitter pattern - what most of us would call working with events. I'm not against the idea of introducing academic descriptions but in this case the beginner might be under the impression that something new was being introduced. This part of the book closes with a look at using timers to execute functions asynchronously. Again this isn't something particularly specific to Node.js and may clientside JavaScript programmers are very used to the idea of using setTimeout and setInterval to avoid blocking the event loop.

 

professionalnodejs

 

So we start Part III of the book after 50 pages that haven't really covered much that is specific to Node.js and which certainly have done nothing to give the beginner any idea why they should be interested in using serverside JavaScript. There have lots of assertions that the event driven approach is clearly the best. But for what and where is the proof?

Part III begins with a look at working with files, creating and using external processes, reading and writing stream data and finally building a TCP server in Chapter 10. You could take the attitude that Node.js is a completely general implementation of JavaScript, but most users want to get to grips with its use as a network server of some description and leaving it to Chapter 10 to introduce the first example or mention of this aspect seems very late to me. 

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.

 

Banner


Microsoft Azure For Dummies, 2nd Edition

Author: Jack A. Hyman
Publisher: For Dummies
Pages: 416
ISBN: 978-1119898061
Print:1119898064
Kindle: B0BNWG1HYK
Audience: Azure novices?!
Rating: 1 or 4.5 (see review)
Reviewer: Ian Stirk

This book aims to provide a gentle yet thorough introduction to Microsoft Azure, how does it fare? 



Fundamentals of Database Management Systems

Author: Dr. Mark L. Gillenson
Publisher: Wiley
Pages: 416
ISBN:978-1119907466
Print:1119907462
Audience: Database managers
Rating: 3
Reviewer: Kay Ewbank

This book is aimed at people taking a one-semester course in database management as part of their larger information systems management course. As suc [ ... ]


More Reviews

 

Last Updated ( Friday, 14 June 2013 )