Software, Team and Strategy

Mike Borozdin - Kubernetes @ Google. Previously: Dir of Eng @ DocuSign, Lead @ Microsoft. I help companies focus and engineers grow.

Monday, January 14, 2013

Node, Heroku and the joy of coding


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.

#3 Ability to reuse open source CSS and JavaScript using EJS.
When creating my app the default was Jade, but I really wanted to be able to reuse CSS and Javascript so I went with EJS.  JavaScript libraries, JQuery templates and other components are all over the internet.  With Jade I would have to rewrite a lot of these examples, but with EJS I was able to implement a lot of elements by just copying and pasting.

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.

0 Comments:

Post a Comment

<< Home