Node: Up and Running – A fine intro to Node.js, the new 799-pound gorilla in the room – #programming #bookreview #in

Node: Up and Running
Tom Hughes-Croucher and Mike Wilson
(O’Reilly, paperback, list price $34.99; Kindle edition, list price $27.99)

Node.js is often described as “the dominant player” in the world of server-side JavaScript development. Whether that’s completely true or boastful hype, big players such as Google, LinkedIn, eBay, Walmart and Microsoft now are using it. And so are countless smaller players and startups. If Node.js is not yet King Kong, it has at least grown into a 799-pound, but reasonably tame, programming gorilla for those who want to write scalable server-side code using JavaScript.

In today’s weird, challenging job market for programmers, it would not hurt you to feed this new gorilla a few bananas and gain at least passing familiarity with it. You never know when you may need to ramp up some Node.js skills in a hurry, to get or keep a job or land a contract.

I like O’Reilly’s “Up and Running” book series for that very ramp-up reason. They do a good job of introducing a programming language and showing how to use key aspects of it. And they point you to additional resources for skills and knowledge you can pick up on the fly.

According to the two authors of Node: Up and Running,“Node.js is many things, but mostly it’s a way of running JavaScript outside the web browser.” They add: “Many people use the JavaScript programming language extensively for programming the interfaces of websites. Node.js allows this popular programming language to be applied in many more contexts, in particular on web servers. There are several notable features about Node.js that make it worthy of interest.”

For example: “Node is a wrapper around the high-performance V8 JavaScript runtime from the Google Chrome browser. Node tunes V8 to work better in contexts other than the browser, mostly by providing additional APIs that are optimized for specific use cases.”

The two authors point out that “JavaScript is an event-driven language, and Node uses this to its advantage to produce highly scalable servers. Using an architecture called an event loop, Node makes programming highly scalable servers both easy and safe.” Node.js also features non-blocking I/O.

Node.js “runs on Windows, Linux, Mac, and other POSIX OSes (such as Solaris and BSD),” the authors state. And this is the second Node book I’ve reviewed that claims the installation process is “extremely simple.” The previous book did not give enough information for beginners. This one follows “extremely simple” with instructions and screen displays spread across nearly four pages. But – a hurried beginner may miss this at first – the steps are only for those who choose to do a source install rather than use one of the Node.js installer links.

The first time I used a Windows link to install Node.js (trying to follow the previous book), I somehow ended up with stuff scattered and duplicated in several subdirectories  –. an “extremely simple” mess.)  This time, my installation did seem “simple,” if not quite “extremely simple.” (Once it completed, I had to go to a command prompt and run “node” rather than just click on a brand new Windows icon — my definition of “extremely simple.” )

Of course, you are expected to have some JavaScript knowledge and programming experience before tackling this book, so you may not want to get ahead of yourself on the learning curve. If you’re currently a JavaScript novice, put this one on the shelf for a little bit later. But definitely get it.

Node: Up and Running offers plenty of code examples, and the paragraphs between them are well-written and kept reasonably short. Thus, knowledge and skills can be gained in manageable small chunks. Only a few other illustrations are offered, and, unfortunately, they tend to be more goofy than helpful.

The 184-page book has eight chapters:

  1. A Very Brief Introduction to Node.js
  2. Doing Interesting Things
  3. Building Robust Node Applications
  4. Core APIs
  5. Helper APIs
  6. Data Access
  7. Important External Modules
  8. Extending Node

Some readers have noted that this book does not contain the traditional appendix giving links and referrals to other sources of more information on Node.js, and that’s a fair criticism. However, the book’s Chapter 6, “Data Access,” does have links to, and discussions of, “the basic ways to connect to common open source database choices and to store and retrieve data.” The topics covered include using Node.js with CouchDb, Redis, MongoDB and relational databases such as MySQL and PostgreSQL. The chapter also looks at connection pooling and message queuing (MQ) protocol.

“The Node project is still very young,” the two authors state, “and yet rarely have we seen such fervor around a project. Both novices and experts have coalesced around the project to use and contribute to Node, making it both a pleasure to explore and a supportive place to share and get advice.”

Their new book, Node: Up and Running, can help you get friendly fast with this new 799-pound gorilla in the room, Node.js.

— Si Dunn

#

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s