I’ve been a fan of Node since we were first introduced in 2011. Unfortunately, it’s taken me a few years to come up with a compelling business use for Node.
Why so long?
When I first met Node, I was working at a .Net development shop. Node was still a Linux-only tool, so to use it on a Windows machine I needed to compile the binaries myself (at the time, using a very exotic development environment).
Working with a WordPress shop gives me more flexibility to use open source (i.e. community “supported”) software, so I’ve long hoped I could find some synergy between Node and WordPress. On the whole, though, I haven’t; much of the interactions I’ve seen thus far are crude hacks or developers merely trying to find an excuse to use Node just so they can use Node.
I spoke with some Node developers at length this past weekend at a conference trying to find ways I can supplement my WordPress work with Node and, finally, came up with some workable project ideas.
Using Node in development
But a build tool doesn’t feel like “using” Node, so I’ve been searching for other ways. Today, a specific project came up that dove-tailed perfectly with Node.
I’m working on a project where I need to verify – in bulk – the “source” parameter of several messages on Twitter. This is easy enough to do thanks to Twitter’s REST API, but the REST API itself isn’t necessarily easy.
Every request needs to be signed (OAuth) and the data return contains a large chunk of data extraneous to my interest. I wanted a simple way to grab the data, strip out just what I need, and dump it to a report. As it turns out, this is a perfect task for a Node application.
It’s not a websocket server, a dynamic blog engine, or anything fancy on the server-side. But it is a way to use Node on the client side to quickly parse what is otherwise a large body of data and rapidly distribute results to my team.
- I originally scripted everything in Ruby, using Rake, but converted it to Grunt as few developers were willing to learn yet another language in order to support my projects. ↩