Node or Not

January 28, 2015

Blog | Development | Node or Not
Node or Not

Front-end web technologies are maturing at a break-neck pace.  It’s hard to keep up, to manage versions and dependencies, and stay abreast of the latest best-practices.  Heck, it’s hard just getting stuff to work correctly without having to go off-roading through someone else’s github repository.  But luckily, there’s a back-end framework that manages all that front-end stuff effortlessly.

The other day I mocked up an administrative web dashboard using the rdash framework.  It was quick and easy- I slapped some dummy charts on it, filled in someLorem Ipsum and showed it off.  It took only a few minutes to get all the frameworks in place; Angular.jsD3.jsBootstrap, and a whole host of others to glue it together.

Then the cool part started.  As I was showing the mockup to a coworker, I made a change to the code- and the web page automatically refreshed with the changes in place.  I had served up the web app using gulp.js, which watched the local file system for changes, rebuilt the entire app, and sent a message to the browser to refresh itself.  My coworker exclaimed that it must save a lot of time, not having to save, build, and then refresh for every change.  Yes it does.

All made possible by node.js.

If you’ve paid attention to the web and software development world in the last few years, you’ve heard about node.js.  You’ve probably even seen the blog posts about what it’s good for and what it’s bad for (video). I’d like to ask a better question: should you use node? If you’re a developer, absolutely.  But maybe not for what you think.

My mockup took only a few minutes to build and demo  thanks to Node’s built-in package manager, NPM, along with the Bower.js front end package manager.  Acronyms aside, what’s actually important is that I used Node as a development tool, not as a platform for the software itself.  That’s right, the finished web app doesn’t include Node at all- it was built with it.

Node can do a lot of stuff.  Most conversations about Node center on how it performs in production, or even just opinions on the qualities of the JavaScript language.  But most of those miss the point: it’s a tool, not a dogma. And tools can be mixed and matched to serve the needs of the programmer. So pick the things Node is good at and run.  Dependencies can be managed, stylesheets and JavaScript bundled and minified, the whole thing wrapped up and put into a folder, ready for delivery.

The cost for all that convenience and power is a learning curve and, for some, taking on our pre-concieved notions about JavaScript.  It’s a wise investment, though, and as developer, one I’m happy to make.

Dan Clouse

Senior Developer
Tags
  • Node.js

Recent Work

Check out what else we've been working on