Adam Christian
« CouchCamp was great
JSConf and NodeConf – 2011 »
December 22, 2010 by adam

Node.JS is a Swimming Pool

Over the past six months I have heard about the unbelievable awesomeness involved in this project called Node.JS. At first I thought, “Server Side JS NOT on the JVM” – YAY! Then after a few days of that I thought, “I really don’t care about server side code, even if it is JS”.

See the thing is, right out of college I started fooling with raw DOM, cross browser event firing and capturing and building pretty big cool projects without the help and support of jQuery. So I developed this sick enjoyment of writing tons of raw uninhibited, IE 6 destroying JS. And ever since then, I have just thought of server side code as a necessary evil that I would PREFER someone else to write for me. Don’t even get me started on databases, I mean really — it’s hard to find software more out of touch with the web than traditional databases.

Anyways, so over and over I have pulled the git repo for Node, built it (a couple times had to Google error messages and change things to get it to succeed). Then I would get a ‘hello world’ working, and promptly close the terminal window and head back to my current Django based project (or close that terminal too and head back to client side JS). See, all along I just wanted to store my data on the client side and have some magic behind the scenes take that data and replicate it to a DB somewhere that I don’t need to know about. The point is that, Node wasn’t that magic and ‘hello world’ didn’t really feel that JavaScripty to me. I mean where is my ‘window’ object? And wtf is up with having to ‘require’ modules? I never got into client side ‘require’, so this concept is relatively foreign to me.

At JS.eu I started hacking on a node app, because I simply felt like a poser attending that conference and having not written much in Node. Honestly, minus a couple HTML 5 talks and some JavaScript icons like Crockford and Brendan Eich, JS.eu could easily have been called NodeConf.eu and no one would have really blinked. So I copied an Express app, got it to do some mundane simple tasks then tried to move to the next level. I got stuck due to some strange behavior that wound up being attributed to variable hoisting. At this point I put Node back in the drawer, see when I use a new technology I really want an impressive ‘hell world’ in less than 2 hours (without reading more than 20 minutes of docs). You may be thinking “wow that’s some serious impatience”, but I would be very surprised if I’m all that different than anyone else’s patience tolerance.

Finally about a month ago, I was about to dive into a new app using Django when @mikeal convinced me to use Node and put it on a no.de smart machine. After provisioning my no.de smart machine I was completely and utterly confused and frustrated. After a handful of questions @mikeal pointed me to: Countdown to Knockout: Post 11 – Deploying to Joyent which (although there have been some changes) made it clear enough that I could get my little app online and usable.

Once you have a working web app, the next evolution is to actually store data somewhere, and as I said before: “I am not a fan of traditional DB technology”. So naturally continuing the conversation landed me at Countdown to Knockout: Post 14 – Using CouchDB with node.js. In my ultimate laziness I couldn’t even be bothered to setup CouchDB on my Joyent smart machine, so I decided to use my CouchOne instance. Then I realized, the “CLOUD” buzz word, actually means; how many people can I pay to put my stuff on their machine? I wish I could also do my testing in the CLOUD, oh wait, you can, and I work there, see Sauce Labs.

So my main point is that for the last six months, Node.JS has been this very interesting swimming pool that I kept dipping my toes into — but it finally reached a reasonable temperature for me to dive in, swim around and discover a whole world (including mermaids like socket.io). Node isn’t awesome because it’s JavaScript, it’s awesome because it fits very nicely into this new development ecosystem where things feel like they are designed for the web. After I recognized the differences between Node and my client side JS habits, I was able to move back and forth between client and server side code without this painful mental context switch I normally experience ย with syntax. It makes me hate server side development way less than I did in the past, and combined with CouchDB we find ourselves in a world where JSON is the native tongue.

Node may not be _the_ future of technology, but I sure see it playing an important role in my future, enabling faster application development. </rant>

Tags: Cloud, Couchdb, JavaScript, Node.JS

Posted in CouchDB, JavaScript, Node, Open Source, Technology, Web | No Comments »

  •   •   •   •   •

Comments are closed.

Sixhours Theme by Caroline Moore | Copyright 2012 Adam Christian | Powered by WordPress
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.