Over the winter break I was working on one of the little projects that I use to try out cutting edge technologies. This time I really wanted to get my deeper with Node.js, Express, Request and Heroku.
I have an old website, www.nationalvip.com, that was basically a shopping cart for nightclub reservations. My interest in nightclubs waned and I really didn’t pay much attention to it for a while. The site still got visitors but it was developed in PHP by extending Magento. Old code base and complicated modules killed any desire to touch that code. I decided that I am going to change the direction of the service and make it totally informational based on open web services that are available from FourSquare, Twitter and other social services.
I am not going to spend any time talking about how to create an app using Express, Node.js and Heroku. There are plenty of blog posts that help you get started with those technologies. I will spend some time talking about the difference in how developing and modifying a project feels.
My background is mostly with C#, Java and C++. Given my “baggage” I found the following differences in development flow pretty remarkable:
#1 Calling REST API without wrappers
Node.js and Request library make calling REST services ridiculously easy. I generally use an API Explorers like the one from FourSquare, Mashery and DocuSign and see what elements of the request or return I need to reference. There is no need to generate proxies and maintain them. You can visually see and get exactly what you need.
#2 Deploying using Git
Git deployment to Heroku is a game changer. In Java days I used to sweat how I am going to FTP to my servers, remember where on a particular linux distro I need to deposit my ROOT.war and then SSH into it to bounce the tomcat. Now pushes are seamless. All I need to do is git push heroku master.
In conclusion the ability to produce and maintain an app with these new technologies is not only fast but also very pleasant. Less time is spent configuring, updating, debugging and translating. More time is spent creating, experimenting, measuring and having fun.