views:

1792

answers:

3

I'm looking for a lightweight Ruby web framework and have come across Sinatra and Ramaze. Both seem extemely light, concise and simple. But I don't know enough about either to say what the main distinctions are. Perhaps someone with experience with one or both of these could comment?

+1  A: 

Sinatra does not enforce MVC.

Miyagi Coder
+16  A: 

Other lightweight Ruby frameworks

I like _why's Camping (now maintained by the community: Rubyforge) which has to be the lightest of them all (for recent info [>= v1.9] see the Camping wiki, or [v 1.5] Jeremy McAnally's Going Camping PDF or these Camping screencasts, this Camping podcast and Nathaniel Talbott's Why Camping Matters, but read the Camping mailing list for current version info changes and evolution and try the latest blog example). You can also now read the latest Camping docs at rdoc.info.

But I did a massive 3-day trawl through all the lighter Ruby frameworks I could find that looked reasonably up-to-date or accomplished (I'm trying to find one to teach students the basics of frameworks) so, to help you make up your mind, the following (with Camping) stood out from the pile (with at least one developer name so you can check them out too)...

For starters, those nice Ramaze people have a list of Ruby frameworks, and here's a good article entitled 10 Alternative Ruby web frameworks. There's also a Ruby-forum discussion about Camping and Merb that also covers alternative ORMs. Remember that some of the below are post-Merb and extend that approach.

Sinatra (Blake Mizerany)

Not MVC, no default ORM. Good documentation. 'A whole web app can be encapsulated in a single Sinatra file'

Sinatra reviews and links:

Ramaze (manveru)

Ramaze runs well with Ruby 1.9.

Ramaze reviews and links:

Wuby (Chris Matthieu)

From reviews: "no third party applications or gems are required to run Wuby apps, and the Wuby library itself contains everything necessary to run an HTTP daemon and start serving requests", "example code has a bit of a PHP feel about it".

Wuby reviews and links:

IOWA (Kirk Haines)

In an article on Ramaze by Antonio Cangiano he writes: "If you mean by 'switch' just a general 'switch from my current framework/programming language/programming style', I have no real answer. An example would be the very much unknown IOWA framework from Kirk Haines. It's been in production use for years, is dead stable, very fast (way faster even than Ramaze), but its documentation and marketing are non-existent. I don't believe in following a hype (even if it's Ramaze) just for the sake of coolness, I need to have a use-case to switch to something new."

Documentation is sparse although Hal Fulton covers IOWA in The Ruby Way, and while the link below says things have moved to Swiftcore, that in turn says they're about to appear on GIT, but that was still empty as of 06jul2009. To further obscure matters the IOWA dates on RubyForge are 2004 so...?

IOWA reviews and links:

Dave Everitt
Thanks for an excellent post, Dave. Will be using this for reference myself.
Lars Haugseth
Glad my 3 lost days in Ruby framework world have proved useful!
Dave Everitt
I'm late to the party, but: AFAIK, Ramaze does not require Ruby 1.9. It should run just fine under 1.8.
Pistos
thanks - corrected!
Dave Everitt
+4  A: 

I think it's a real question of taste between both Sinatra and Ramaze. Both good, both light.

The big difference would be that Ramaze is more MVC. Sinatra in the other hand works like a DSL and is RESTful.

I would suggest that you read the GET_STARTED of them which wouldn't take more than a couple of minutes, and you'll see what the difference is.

I personaly like them both (with a preference for Ramaze), but one thing that could help you make a decision is the fact that Sinatra is little bit more popular (i think), so you may find more docs on the web.

In the other hand, you can use Ramaze and help making it more popular. The IRC channel for Ramaze is full of gentlemen (including me) who will be happy to help you and answer all your questions.

Hope it helps. Mig

Mig