views:

163

answers:

4

I have once again fleshed out Ruby, after two years of not touching it, and am considering programming for the web with Ruby. However, I have found that the Ruby on Rails framework is just too large and bloated for my taste. It is usually a matter of preference, but in my case, I just want to be able to program on the web without having to worry about structuring my code with a framework similar to RoR.

When programming for the web with Ruby, should I be using a framework? Is it recommended? If you could recommend a simple one, which would it be?

Thanks.

+6  A: 

The simple and minimal framework for ruby is sinatra

ennuikiller
+2  A: 

IMO, using a framework is good idea (don't reinvent the wheel etc). Just find one that suits your needs.

Apart from Rails, I've heard about Merb, Camping, Sinatra and Ramaze. For a quick comparison, you might want to read this post. For some other ideas, check 10 Alternative Ruby Web Frameworks.

EDIT: As pointed out in a comment, Merb and Rails are merging and according to Merb creator Ezra Zygmuntowicz (see this blog post), "Merb is Rails and Rails is Merb" so I guess Merb isn't that light.

EDIT2: As pointed out in another comment, the goal of this merge is to make Rails malleable so that you don't need to use all of Rails if you don't want to.

Pascal Thivent
Merb + Rails 2.3 => Rails 3. Merb is merging into Rails. Therefore I wouldn't start a new Merb project at this point. Wait until Rails 3, or use the current Rails (or Sinatra for a lightweight framework).
hgimenez
Merb isn't meant to be light or heavy, per se — its goal is to be malleable, so it can be as heavy as you want it to be. And that's the goal for Rails 3 — to make it so that you don't need to use all of Rails if you don't want to.
Chuck
Thanks for the details Chuck. I'll include them in the answer.
Pascal Thivent
+1  A: 

Sinatra is a very good choice

khelll
A: 

Even if you use no framework or a very light weight one, you will notice that when your application grows, you'll try to replicate existing features of Rails or other MVC frameworks to solve your challenges. By the end of the day, you'll still end up with a heavy weight framework whichever path you take.

Thierry Lam