InfoQ

News

The Forgotten Ruby Web Frameworks

Posted by Sebastien Auvray on Nov 06, 2007 09:00 AM

Community
Ruby
Topics
Web Frameworks
Tags
Rails
With the success of Ruby on Rails, is there a place left for other Web frameworks written in Ruby? Everyone knows Rails, some might even have heard of Merb and Camping, but has anyone heard of Nitro, Ramaze, Sinatra, IOWA or Cerise? InfoQ quickly tours these frameworks and how they are appreciated (or ignored) by the blogosphere.

We previously talked about Merb which is maybe the most accomplished Rails alternative. It is a fairly active project and is used in several production environments. It is the Ruby Web framework which has the most similarities with Rails.

Camping defines itself as a web framework which consistently stays at less than 4kb of code. The project is 22 months old, and maintained by whytheluckystiff. A whole web application can be defined in a single file while still following the MVC pattern (making it easier to migrate to Rails later). Camping uses ActiveRecord as the ORM; the templating system used is Markaby. Whytheluckystiff keeps enhancing Camping on a regular basis.

Nitro is a 3 years old "Web 2.0" framework.  After a period of inactivity, George K. Moschovitis seems to be active again. Nitro apps are written in Ruby for server side and Javascript for client side. Urubatan made a recent review of it. Contrary to Rails which favors coding by convention, Nitro is more flexible. Nitro also makes it possible to write Model-View-Controller based apps and non-MVC php-style apps as well.  Nitro uses xhtml files with custom Ruby tags as template system.  Nitro also uses its own persistence layer called Og (ObjectGraph). Og allows the serialization of arbitrary Ruby objects. Once marked as Object (or Array or Hash) in the attr_accessor, the engine will serialize a YAML dump of the object. Arbitrary object graphs are supported too. Og provides automagic database evolution: when a Ruby class is changed, Og will automatically detect it and change and alter the database accordingly. Some of you might miss all the features of ActiveRecord Migration.

Ramaze is a 6 month old light Ruby Web Framework. It was built using well-known Ruby principles:
  • KISS (Keep It Super Simple)
  • POLS (Principle Of Least Surprise)
  • Modular design
  • Minimal dependencies
  • Documentation
  • Open development
  • BDD Development / Examples
Ramaze is an MVC web framework which uses its own templating system called Ezamar. But you can also plug Markaby, HAML, Liquid or ERB over it. Ramaze doesn't come with a default ORM (Object-Relational Mapper), you can use the one of your choice: ActiveRecord, Og... It supports advanced usages such as Cache, and webapps can be served through Mongrel or Evented Mongrel. You'll find more details about it on the Ramaze wiki.

Sinatra is a one month old DSL web development framework. Ron Evans made a short review of it. The major difference with Rails is that it is not a Model-View-Controller based framework. Sinatra is made of a minimal DSL-syntax, its small base core does not contain such module as ActiveRecord. Sinatra has dynamic route definition through the use of get/post action definitions. As Ron states, Sinatra is not made for robust web applications, but rather small prototype where mixing business logic and presentation layer is not a problem.
So what would it be good for? API implmentations, quick minimal applications, and web development that does not want or need things that are included in Rails, like ActiveRecord. Control panel mini-applications, or perhaps widgets.
Of the other frameworks, IOWA has not been active for 3 years and Cerise has not been active for 1 year so we won't go into those.

Apart from Nitro which, like Rails, has its own complete core, the other web frameworks try to be as small as possible, making the user free to plug in their favorite ORM, Templating System, etc. Even if some of those frameworks might suffer from a lack of documentation or even it they do not have as many features, popularity, or users Rails, they might still be worth having a look at.
IOWA by dddq dddq Posted Nov 6, 2007 3:57 PM
Sinatra & ERB/Haml by Blake Mizerany Posted Nov 6, 2007 4:37 PM
Re: Sinatra & ERB/Haml by John Green Posted Nov 6, 2007 4:51 PM
IOWA by Horacio Lopez Posted Nov 7, 2007 7:30 AM
Re: IOWA by Sebastien Auvray Posted Nov 7, 2007 7:57 AM
Re: IOWA by Kirk Haines Posted Nov 7, 2007 8:08 AM
Re: IOWA by Horacio Lopez Posted Nov 7, 2007 1:37 PM
  1. Back to top

    IOWA

    Nov 6, 2007 3:57 PM by dddq dddq

    I though Kirk Haines was maintaining IOWA. Maybe this is bogus.

  2. Back to top

    Sinatra & ERB/Haml

    Nov 6, 2007 4:37 PM by Blake Mizerany

    Sinatra currently supports both Erb and Haml for Template and Inline use. Creating your own renderer for you template of choice is as easy as pie. Enjoy. http://sinatra.rubyforge.org/doc/classes/Sinatra/Erb/EventContext.html http://sinatra.rubyforge.org/doc/classes/Sinatra/Haml/EventContext.html

  3. Back to top

    Re: Sinatra & ERB/Haml

    Nov 6, 2007 4:51 PM by John Green

    Sinatra and Haml are a great combo. So little code to make functional apps.

  4. Back to top

    IOWA

    Nov 7, 2007 7:30 AM by Horacio Lopez

    IOWA is not defunct at all. Avi Bryant abandoned the project many years ago, but shortly after Kirk Haines picked it up and revamped it significantly. There's probably few remaining lines of code from the original IOWA by Avi, if any. The newest incarnation of IOWA is now under the Swiftcore project umbrella. http://swiftiply.swiftcore.org/index.html So from now on, the new IOWA will be rebranded as Swiftcore IOWA, which is alive and kicking, you can use "Avi Bryant's IOWA" to refer to the former project he abandoned around year 2002. We're also on irc: irc.freenode.net #swiftcore

  5. Back to top

    Re: IOWA

    Nov 7, 2007 7:57 AM by Sebastien Auvray

    Hi Horacio, Sorry for that! I have to admit I had problem keeping track of the IOWA project and I never used it myself so it made my investigations even harder. Thanks for the clarification, it should definitely be part of my post. I might write about Swiftcore IOWA in a future post. Regards, Sébastien.

  6. Back to top

    Re: IOWA

    Nov 7, 2007 8:08 AM by Kirk Haines

    The placeholder for IOWA's new site was put up a couple of days ago. New content will be going up onto it soon. Feel free to contact me at wyhaines@gmail.com if you have any questions. Kirk Haines

  7. Back to top

    Re: IOWA

    Nov 7, 2007 1:37 PM by Horacio Lopez

    um... good, you got Kirk's email contact now for when you want to write that future post. In the meantime, it would be advisable to correct the factual mistakes on this one. Thanks for your attention, vruz

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.