Node: Up and Running

Author: Tom Hughes-Croucher & Mike Wilson
Publisher: O'Reilly
Pages: 204
ISBN: 978-1449398583
Audience: JavaScript programmers
Rating: 3
Reviewer: Alex Armstrong

Node is a way of using JavaScript on the server side - it's relatively new and this slim volume aims at getting you started.

Node is a development on the basic JavaScript engine used in the Chrome browser to allow you to write JavaScript programs to serve HTML and other types of content. Most writers identify its key feature as being its asynchronous nature, but for me its key difference is that it does away with the whole concept of a server. Instead of using JavaScript to control what a full server like Apache does, the JavaScript implements the server. You actually create the server as a JavaScript object. This can leave many web developers very confused when they realize that it's all down to them. There is no default behaviour for a Node server.

 

nodeuprunning

 

 

The book starts off with a quick justification of the Node idea and then goes on to show you how to install Node and create your first "hello world" server. Chapter 2 opens with another example - a chat server. This starts simply but gets increasingly sophisticated as we work though the chapter. This probably isn't the best way to give the beginner an idea of what Node is all about.

Chapter 3 moves on to consider some of the philosophy of Node, i.e. the event loop and asynchronous programming. This probably should come before chapter 2. However, this is not the simple introduction it appears to be when you start reading it. By the end of the chapter we are already looking at Node clusters to make use of multiple threads. This would probably be better left for later.

 

Banner

 

The second part of the book is a "Deep Dive and API Reference". The idea of putting together reference material with a deep dive isn't a particularly good one. In a deep dive you want to learn concepts and patterns, not look up reference material. Basically what you get is a set of chapters that take you though the core APIs with some discussion. In the main the discussion is a bit thin, but at least there are small examples.

Chapter 6 is noteworthy for going a little off the beaten track to look at using NoSQL with Node - CouchDB, Redis and MongoDB. Not an in-depth look but enough to get you started. The final part of the chapter deals with using MySQL and PostgreSQL.

Chapter 7 deals with some external modules that you can use with Node - Express (MVC framework), templating engines and so on. The final chapter is about extending Node.

You do need to be a reasonably good JavaScript programmer to read this book - it is for Node beginners not programming beginners. Overall the problem with the book is the way the level changes. One minute you are being spoon-fed ideas about asynchronous programming and blocking using postal analogies and the next minute there is a discussion of handling multithreaded designs. There is also the small problem that Node is a moving target and some parts of it have moved on since the book was written. You will need to consult the online documentation.

If you are looking for a book that mainly explains by presenting short examples, this one might work for you.

 

Banner


Math for Programmers (Manning)

Author: Paul Orland
Publisher: Manning Publications
Date: January 2021
Pages: 688
ISBN: 978-1617295355
Print: 1617295353
Audience: Python developers interested in math
Rating: 4
Reviewer: Mike James
Of course you need to learn math, don't you?



The C# Workshop (Packt)

Author: Jason Hales, Almantas Karpavicius and Mateus Viegas
Publisher: Packt
Date: September 2022
Pages: 780
ISBN: 978-1800566491
Print: 1800566492
Kindle: ‎ B0BGRBDJLS
Audience: C# developers
Rating:  4
Reviewer: Mike James
C# is not the language it once was - time for a revival?


More Reviews

Last Updated ( Thursday, 22 November 2012 )