Are there any potential drawbacks to using a Ruby framework other than Rails?

I would like to use a lighter structure than Rails (Sinatra / Ramaze / Camping), but I am worried that by doing this I will not be able to use many shared libraries that have been adapted to Rails as plugins. Is this the main problem or most of these plugins are applicable in different Ruby structures?

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

+6
ruby ruby-on-rails web-frameworks sinatra ramaze
source share
6 answers

You can still use gems in all the frameworks you mentioned, so many things can be reused. Want to swap the new ORM, no problem. Want a fantastic shmacy syntax highlighting, no problem. Rails makes a huge push to move away from the old plugin model to use gems exclusively.

If one of the other frameworks meets your needs, it is best to use it. Keep in mind that when it comes to documentation and samples, rails have more.

If I studied Ruby and wanted to try the web framework, I would probably go with Rails, not because it was better, but because it had much better equipment and documentation.

+9
source share

Most of the Ruby modules used by Rails (even ActiveRecord) can be used without Rails. But then you lose the added value of the integration provided by Rails. You may need to work hard to glue the Ruby modules into the frames of your choice. Also note that most of the documentation for the Ruby modules used by Rails tells you how to use this module with Rails.

+1
source share

Network effects play a small role.

+1
source share

One of the problems when using other frameworks such as Sinatra, camping, etc., is that the rails give you a proven structure for your files in your application. Smaller frames are quite open and free.

This can be a disadvantage when you work with several developers, because you need to have conversations about creating agreements, and not just follow them.

+1
source share

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

Lighter frameworks, primarily Sinatra, tend to be popular among people who know exactly what they need and cannot afford to have extra overhead from unused code. Essentially, you choose your toolchain, rather than just dwell on what Rails gives you. (Yes, in Rails you can replace ActiveRecord, etc. with other libraries, but it's not that simple.) Thus, lighter frameworks give you significantly more freedom, but in many cases you also have a bit more work.

+1
source share

I think that no rails plugin will work out of the box with any of the alternative frameworks other than ActiveRecord plugins (such as actions_as_nested_set, etc.) that still need some plumbing work (setting $ LOAD_PATH and requiring rights files). I would recommend DataMapper for ORM, not only faster than ActiveRecord, but it is also very modularly built, and plugins are real gems that you can easily install. In contrast, ActiveRecord plugins are basically monkey patches, which tend to break with each new version.

Sinatra does not come with any β€œgoodies”, without Rakefiles, without skeletons, no script / generate, but actually what it was written for. You can gradually "weighed" all the extra things. There are also skeletons for sinatra applications that come with some basic layouts and defaults, you may find them useful.

0
source share

All Articles