Back to the Future With Ruby and Sinatra

We love Sinatra — both the singer and the Ruby programming framework. We were first introduced to Ruby after attending a Salt Lake Agile users group. Those meetings centered around Ruby, with lots of cheerleading by Zhon Johannsen and others. Seeing lots of examples of Ruby TDD, in combination of having taken an AI course centered around LISP, really embedded the beauty of the Ruby programming language.

Although Ruby on Rails, (whose name was always backwards), took the web development world by storm, we realized that using Rails seemed to caused too much mental effort to learn the framework, taking away from programming the apps. A great explanation of Rails was put by someone as “easy to use, hard to master”. So as we looked for other Ruby oriented
frameworks, we found Sinatra. Instantly, it felt right. And since we really like
Frank Sinatra’s music, even the framework name sounded right (although we love trains too so Rails is nice as well).

But it was really the Ruby Sinatra subtitle, “gets out of the way”, that was the main reason the framework clicked and became instantly productive. Sure, it requires more programming than Rails, but programming in Ruby is relatively easy and is enjoyable (at least to a programmer).

Sinatra allowed us to build fast, productive web apps, including an entire city simulation and strategic planning model. Life was good.

But we also like JSON — it’s data storage in the simplest, cleanest manner. So,
along with some confusion in the Ruby arena (between versions 1.8 and the much faster, but breaking 1.9), we got attracted to the new kid on the block, Node.js. Having one language, in this case, javascript, on both the server and the client browser is highly seductive. Just like Communism or forms
of Socialism, in theory it sounds utopian and right. Only problem is, it never works in the real world. Thus we began 5 years of wandering in the javascript desert. We did the javascript dance: first it was CouchDB apps, then it was Backbone, then Angular, and finally React. All of these worked only to some degree, but consumed enourmous and non-productive amounts of time. Finally, after taking the React bait, and wrestling with all the new Flux bells and whistles, we threw our hands up.

Sometimes, it seems to take some form of despair which allows opening one’s mind to listen to a higher power. Then the right answer appears in one of those “duh” moments. For us, it was the question, after all these years of screwing around with Node and javascript and learning just about everything about web developement languages, what really
worked for us? The answer was simple, …. Ruby and Sinatra!

Of course there has been the feeling of depressive remorse — why did we ever leave thee, Ruby and Sinatra? But no matter, we are back to Ruby.

In the 5 years since, the Ruby world has come a long way. The version wars are over and now the 2.x series is moving along. Rails has become incredible with improved security and the “asset pipeline” stuff. And now there’s Opal — Ruby on the client.

We are now back to building productive apps using both Rails and Sinatra. Despite all the Rails improvements, it still feels too complex, with all the “magical” gems and helpers. Sinatra is so simple, so clean. It allows the power of Ruby to shine thru. Sadly, Sinatra seems to have lost some love in the community.

We are now slowly experimenting with Opal and Voltrb. The ability to move our Ruby code over to an isomorphic stucture might just be the holy grail of web development. Meanwhile, it feels real good to be productive again.

ps: our new mobile office came with a subscription to Sirus radio. Channel 71 is “Sirusly Sinatra”. So now we have Sinatra from all sides. Life is good.

Like what you read? Give Tiger Nassau, Inc. a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.