Bob Nadler, Jr. Bob Nadler, Jr.

Hoboken: A Sinatra Project Generator

Published over 8 years ago 1 min read
Welcome to Hoboken
Image by Wally Gobetz

I'm a huge fan of the Ruby web library, Sinatra. I think its biggest strength is that it allows me to structure my applications to fit the problem at hand, instead of trying to shoehorn my problem to fit a pre-determined structure.

A couple of years ago, I answered this question on Quora. The question asked for an example of a well organized Sinatra application. Since then, I've written quite a few Sinatra based applications and found that I mostly start with a basic structure. This structure will evolve over time, but it usually starts in the same place.

A few months ago I sat down and started to write a project generator for Sinatra written using Thor called Hoboken. The idea behind it is to balance bootstrapping a Sinatra project quickly, yet still maintain the advantage of flexibility that using Sinatra provides.

At its core, Hoboken provides a simple generator that can be used to bootstrap Sinatra classic or modular applications. It provides the basic plumbing needed to get your project going, then it gets our of your way. Hoboken also supports "add ons" which can be a combination of other gem dependencies and the code needed to wire them into a Sinatra application. For example, if you would like to add OmniAuth to your project, Hoboken allows you to easily choose a provider and then generates the code needed to get up and running.

I hope that other developers can use Hoboken to save them time when starting new Sinatra applications.

Share This Article