September 4, 2010

There’s some code in my Node

Posted in Uncategorized at 11:10 pm by dgcombs

Over the past several weeks, I’ve been migrating my Firewall Log & Security Metrics web application from Java Server Pages built on Caucho’s Resin web server to a new technology based on JavaScript and Node.JS. It has been exhilarating and depressing, captivating and frustrating!

Even the most cursory survey of Node and the ecosystem growing up around it will give you the impression that it is a technology as volatile as R.L. Stine’s version of pumpkin juice and just as tasty.

My initial foray into the field of action included installing and configuring a package manager called Kiwi. The program is designed to allow the programmer/author to easily download, install and update modules required for Node-based applications. However, about thirty days into it, I found that Kiwi had been superseded by NPM, another package manager. Switching from one to the other was not complicated but it was time consuming. The invocation of modules under Kiwi was a little more complex than when using NPM. First you require Kiwi and then use it to find the modules it supports.

var kiwi= require(‘kiwi’)

NPM is simpler. As part of the install process, it sets up pointers in /usr/local/lib/node for each of the modules and sets a symbolic link to point to the version installed. As a result, you need not have a middle-man arbitrate access to modules for your application.

var sys = require(‘sys’),
express = require(‘express’);

Another rapidly changing underlying technology is Express. Modeled after Ruby’s Sinatra, and bearing a resemblance Python’s Django web framework, Express provides a rapid development environment for Node applications written in JavaScript. Express recently achieved version 1 (a whole number without any decimal points!), lost the plug-in construct it had been using in favor of Connect middleware from Sencha Labs.

It seems as soon as I learn something difficult, quite an achievement with my little gray cells, it changes. On the whole, the new features have made things simpler. And this has fed my exhilaration, sent me on a spiral of depression, riveted my attention and stymied my progress. But I wouldn’t change a thing. Seriously. No more changes! At least for a while.


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: