On many occasions I've decided to get acquainted with a new technology (language, framework, etc.) - SOLR, FW/1, Jenkins, Semantic UI, and a long list of others. The amount of time I've spent dedicating myself to getting proficient at each of these has varied, and based on the number of years I've spent writing code, I can say that the term "proficient" is pretty subjective. I've been mostly happy with ColdFusion over the years, but it is apparent to me that cfml is a little like a salmon swimming upstream, and there's a need to expand my horizons in order to remain relevant as a developer (not that I'll be ditching CF or Railo anytime soon). So I decided to give Node.js a shot.
What is Node.js?
Download and Install
So, the first step in the whole process is simply downloading and installing Node from the website Nodejs.org. Here are a couple videos showing the installation on PC and MBP. It was all very straightforward. I accepted all the terms and used all the defaults for installation, and the whole process was less than two minutes.
Getting Acquainted with Node.js
After the installation was complete, I clicked the Node.js shortcut, and I got a terminal (actually it's the Repl). I had no idea what to do next. It took me back to my childhood when I first booted up an "IBM PC Clone" and got the DOS prompt.
I decided to Google the YouTube* for answers, and I found a really good video explaining the basics of Node. In the video, what wasn't so apparent to me at first was that the three screens he was showing were Sublime Text (the code editor) on the left, the shell (cmd in Windows, bash in Mac) on the top right (this is NOT the Node Repl), and Chrome browser on the bottom right. He demonstrates what modules are (think .cfm file), the require statement (think cfinclude), some use cases for Node.js, and a little about how Node Package Manager (NPM) works. In ColdFusion we don't really have anything like NPM unless you're using CommandBox which is fairly new to cfml. Props to Luis and Brad on that!
The Next Step
I'm really excited to start my first project with Node.js. In an upcoming post I'll start my first small project - building a static site with Node.js for one of my domains. It'll be an ongoing experiment, and I'm sure I'll make it harder than it needs to be, but I welcome any input others may have. This is what learning is all about. As a side note, I've been trying to do more on the iOS side of things the past year, so I'm going to try Node on both my Windows 7 PC and my MacBook Pro. I'll point out anything peculiar as I see it.
* I know.