views:

744

answers:

7

I would like to use a lighter framework than Rails (Sinatra/Ramaze/Camping) but am concerned that by doing so I will not be able to use a lot of shared libraries that have been tailored to Rails in the form of plugins. Is this a major concern or are most of these plugins usable across different Ruby frameworks?

Are there any other potential disadvantages in using a Ruby framework other than Rails?

+8  A: 

You can still use gems in all of the frameworks you mentioned, so a ton of stuff is reusable. Want to swap in a new ORM, no problems. Want a fancy shmacy syntax highlighting, no problems. Rails has been making a huge push to move away from the old plugin model to use gems exclusively.

If one of the other frameworks fits your needs better use it. Keep in mind that when it comes to documentation and samples rails has more.

If I was learning Ruby and wanted to try out a web framework I would probably go with Rails not because its better, but because its got much better tooling and documentation.

Sam Saffron
+1 A lot of rails plugins can also be refactored as gems with almost no effort. They were released as plugins just because that was convenient for the original author.
Walt Gordon Jones
+1  A: 

Most Ruby modules used by Rails (even ActiveRecord) can be used without Rails. But then you lose the extra benefit of integration provided by Rails. You may have to work extra hard to glue Ruby modules to the framework of your choice. Please also note that most of the documentation about Ruby modules used by Rails tells you only how to use that module with Rails.

pts
A: 

I think no rails plugin is going to work out of the box with any of the alternative frameworks, except for ActiveRecord plugins (such as acts_as_nested_set etc.) which are still going to need some plumbing work (setting $LOAD_PATH and requiring right files). I'd recommend DataMapper for ORM, not only its way faster then ActiveRecord, but it's also very modularly built and plugins are actual gems that you can easily install. In difference, ActiveRecord plugins are mostly monkey-patches that tend to break with every new version.

Sinatra doesn't come with any "goodies", no Rakefiles, no skeletons, no script/generate, but actually that's what it's been written for. You can gradually "plumb in" all the extra stuff. There are also skeletons for sinatra apps that come with some basic layout and defaults, you may find these useful.

esad
+1  A: 

Network effects play a bit of a role.

Andrew Grimm
+1  A: 

One issue that comes up when you use other frameworks like sinatra, camping, etc is that rails gives you a proven structure for your files in the your application. Smaller frameworks are quite open and free.

This can be a downside when you are working with multiple developers as you need to have conversations about creating conventions rather then simply following them.

+1  A: 

If you've been using Ruby for less than a year, stick to Rails, unless you have a very clear need that is better handled by one of the other frameworks.

The lighter frameworks, most notably Sinatra, tend to be popular with people who know exactly what they will need and can't afford to have any additional overhead from unused code. Essentially, you pick your toolchain, instead of generally being stuck with what Rails gives you. (Yes, in Rails, you can replace ActiveRecord, et al. with other libraries, but it's not exactly easy.) So the lighter frameworks give you significantly more freedom, but you also have quite a bit more work to do in many cases.

Bob Aman
A: 

i need abook or academic web site takes about the disadvantages of using ruby in rails please i nedd it asap.

is any one can help me with that please

thank you

adla
This doesn't answer the question originally posed; it should be its own question.Frankly, I also think it's going to be difficult to answer without some more background information on the motivation behind the question.
NeilS