Search code examples
ruby-on-railsrubysinatrapadrino

If I learn Sinatra or Padrino, does that help me with Ruby on Rails?


If I learn Sinatra or Padrino, does that help me with Ruby on Rails?

I assume that for all of these I need to get a better understanding of Ruby itself, but does (say) Padrino translate directly into skills I would use in Ruby on Rails or is it indirect?

I am a PHP programmer, but, as I have used PHP frameworks which are clones of Ruby on Rails, I am finding it not too difficult.


Solution

  • This might be a more controversial opinion, and I'll admit to being new to both still, but as someone who just spent a week on Sinatra and then moved on to Rails, I would recommend going straight for Rails. Initially, it will seem like there's a lot more to learn about Rails, but if you're going to write something moderately complex, you're going to move to Rails eventually, and it's less work 'unlearning' from Rails what you need to write a Sinatra app than it is to relearn things to do it the Rails way. You save yourself the pain of having to shift gears when it turns out that your project you started in Sinatra was best done in Rails after all (which happened to me).

    This does mean it's going to take a little longer to get up to speed on Rails. I recommend starting with Michael Hartl's tutorial and the official guides. However, my advice is specifically geared towards existing developers who already know how to develop web apps and are more likely to have more complex projects in mind than beginners. Someone brand new to web app design may very well appreciate the immediate gratification that building a basic Sinatra app will offer, but that doesn't seem to be you.

    Experienced developers will probably argue that you can definitely write 'moderately complex' apps in Sinatra too, and they will be right. I think Sinatra's strengths are in being a fallback for experienced developers who want to knock out a quick app without Rails 'overhead', and not as an introduction to Ruby/Rails based web app development.