Journal
Going with Ruby and Sinatra
These past couple days, I’ve been getting deep into the thick of things with Node.js and Express. I really enjoy it, but now that I’m dealing with more than the initial setup of Cushion, I’m starting to realize that maintaining this kind of codebase might wear on me.
I’ve been warned by several others about the callbacks in Node.js and I finally understood why. It doesn’t help that I come from Ruby, where everything is synchronous—I could make a call to a remote server on one line and handle the response on the next. In Node.js, the second line would be called immediately after, unless we put it inside a callback function.
In use-cases that rely on asynchronous code, this is a great benefit of Node.js, but with Cushion, it becomes a distraction. Since Cushion will be very frontend-heavy, I don’t really need much fanciness on the backend—mostly serving pages and data. Because of this, I think it’s best to return to Ruby and build Cushion on Sinatra.
I realize I’ve been flip-flopping lately with stack decisions, but I think it’s good to get this out of my system now rather than later. I would hate to be halfway done with Cushion before realizing the mistake, then begrudgingly building out the rest of the app, knowing it is destined for a rewrite.
Another bright side of this decision is that I can return to what I know. Since I’ve written several Ruby apps in the past, I know what to expect. I won’t be wasting time on the learning curve, and I can make use of all that I’ve learned over the past few years of building Ruby apps.
Now that I got the new-tech craving out of my system, I’m excited to go full speed ahead with Cushion.