Node for Front-End Developers
By Garann Means
(O’Reilly, paperback, list price $14.99; Kindle edition, list price $7.99)
Node.js is easy to download. And, according to Node for Front-End Developers: “Node is easy to set up or very easy to set up. Node runs on Unix-compatible systems and, more recently, Windows.”
Sparse information for Node beginners, however, is not limited to Node for Front-End Developers. I checked several other sources of Node documentation and found similar problems. You’re just supposed to know this stuff, I guess.
As one example, I followed the book’s instructions to create Node’s important package.json file, then discovered that what I had downloaded from Nodejs already contained a package.json file. In fact, it was now in several subdirectories. Was I supposed to edit it, instead? Delete it and replace it with my file? Had I just screwed up the installation by creating my own file?
After a lot of horsing around with node and npm at the command line and getting strange results at the not-quite “Hello World” level, I happened across a small note on the GitHub.com website. It stated that Node’s “Windows builds are not yet satisfactorily stable but it is possible to get something running.”
Especially if you resort to package managers to help you out. And maybe get assistance from a Node guru. [See UPDATE below.]
Yes, I was indeed attempting a Windows setup, and I did get Node to partially work. But after several tries at reinstalling, rebooting, debugging, and attempting to supplement the book with conflicting bits of information downloaded from the web, I gave up having “fun” with Node. (UPDATE: Recently, I reviewed my command line procedures a bit, looked again at my files and subdirectory structure and tried again. This time, Node works fine at the “Hello, World” level and beyond. I stand by my criticism that this book’s how-to-get-started instructions should be made clearer for Windows users. But I am at fault, too, for not figuring out what I was doing wrong much sooner.)
and are using something other than (and better than?) a Windows machine.
As for Node for Front-End Developers, the rest of the book appears to be an easy-to-use guide to getting a basic understanding of the Node platform. The code examples look good and are preceded by well-written explanations. I have now tested some of them successfully and plan to try a few of the longer, more-complex examples soon.
wish I could have tested more of them. But I intend to keep this book and try Node again once easier and more stable Windows options are available.
The book’s chapters are:
- Chapter 1, Getting Node Set Up
- Chapter 2, Serving Simple Content
- Chapter 3, Interaction with the Client
- Chapter 4, Server-Side Templates
- Chapter 5, Data Sources and Flow Control
- Chapter 6, Model-View-Controller and Sharing Code
How-to-get-started instructions are vital in any programming and developer’s book, in my view. And they need careful preparation and presentation for every major operating system that is supported.
Countless beginners are looking for new programming and development paths and challenges, and many of them will buy books that are beyond their experience level so they can try to learn faster and backfill as they go. Most of them also won’t have the latest-and-greatest hardware and software. Therefore, minimum requirements need to be spelled out clearly, as well.
It pays to be versatile in today’s fast-paced tech world.
But yeah, I probably do need a Mac and a Linux machine flanking my Windows PC.
– Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. His latest book is Dark Signals, a Vietnam War memoir available soon in paperback. He also is the author of a detective novel, Erwin’s Law, a novella, Jump, and several other books and short stories.