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?
I like _why's Camping (now maintained by the community) which has to be the lightest of them all (for recent info [>= v1.9] see the Camping links on the Camping wiki, Eleanor McHughe's 'Going off the Rails' or [v 1.5] Jeremy McAnally's Going Camping slides 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 api docs.
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 used to have a list of Ruby frameworks but the link is gone, 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.
Not MVC, no default ORM. Good documentation. 'A whole web app can be encapsulated in a single Sinatra file'
Ramaze runs well with Ruby 1.9.
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".
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...?
Sinatra does not enforce MVC.
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 people (including me) who will be happy to help you and answer all your questions.
Hope it helps. Mig
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With