Fleegix on Sinatra
The Sinatra Web dev framework has been around for a while, but I've recently been seeing it popping up a lot more.
Simon Willison , the co-creator of the Django Python Web-dev framework, even mentioned it to me at SXSW Interactive when I buttonholed him after his panel on the Changing Face of News , to ask him what the Guardian is using for their API service.
(Sadly, he said, it's still all enterprise Java. NPR is using a mix of PHP and Java, and the New York Times runs their API service on Ruby on Rails.)
I suggested to Simon that Sinatra's higher profile comes from its status as the new anti-Rails, and Ezra Zygmuntowicz said the same thing today on Twitter :
@wycats sinatra is filling the gap now that merb is an organ donor ;)
He is of course referring to the fact that Merb , the Ruby Web-dev framework which has proven to be a credible competitor to Rails, is now being merged into Rails -- the result being Rails 3.
But Sinatra is more than that -- Adam Keys put it well in that same back-and-forth on Twitter :
@wycats I see some people taking to Sinatra now that Merb isn't the angsty choice. But mostly, its people looking to do more with less code.
Unless you have a case of man-with-hammer syndrome , you see that no single tool is right for every job -- and Sinatra's lightweight approach (it doesn't even bill itself as a framework, just a 'DSL') looks great for simple uses where you don't need all the overhead of Rails (or even Merb).
I recently converted the Fleegix.js project site from a Merb flat app to a gorgeously minimalist Sinatra app , and found Sinatra's simple aesthetic to be just about perfect. I could also see using it for throwing up simple Web services as well (although it's hard to beat Merb's resource routes and braindead-easy display/provides content-negotiation for that).
My next Sinatra project will be the EpiphanyRadio site, which is definitely due for a little love. It's another simple site (currently a bunch of raw mod_ruby/eruby) which would be a lot nicer as a simple Sinatra app.