Sinatra has been getting a lot of hype lately as the next great (micro)-framework. In writing apps, diving in, and contributing the reasons for its existence have become more clear. Sinatra is not just a toy or a neat trick, its the best way to create simple and non-obtrusive web interfaces to sit on top of a new or existing ruby project.
Sinatra is less then a framework – it’s a web library. This isn’t a slap in the face – it’s truly a compliment. Sinatra’s size and portability make it extremely easy to incorporate to existing Ruby apps. I’m talking BEYOND Rails. I’m talking about command line tools, complex C bindings, you name it. Sinatra can be required and a script can be fashioned to give a dusty ol’ code-base new life in a browser.
I decided not to just preach and tried to take my own advice. What came out of my first attempt is gembox. Gembox is a very light interface built on top of Ruby Gems. Download it, start it with:
That’s it. Ruby Gems is great starting point because it has a well defined API and a huge user-base (rubygems users === ruby users). What it doens’t have is a great web interface. Just booting up this little app gives you a pretty (albiet currently shallow) interface to your gems. This app is tiny. I chose to split it out over multiple files, but with your app could have put this all in a single file and included it in your library’s name-space. It’s that easy.
So here’s my pitch: Give your gems/libraries/code bundles beautiful web interfaces with minimal effort using Sinatra.
I think gembox was a successful little experiment and over the next weeks I’ll be updating my gems with simple interfaces.
Currently, I’m in the running for a spot to speak at GoGaRuCo. I like the idea of the attendee’s being able to vote for what presentations to have at the conference, but I think having a truncated synopsis listed might not give me the best chance. So I’d like to try to explain what I plan to talk about a little further. If you like what you hear please vote!
Photo Credit: http://flickr.com/photos/rnyk/2493099076/