Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What is the best framework for start: rails or sinatra? I heard that sinatra is more flexible but rails has a lot of documentation and tutorials. What's your choice?

share|improve this question
add comment

3 Answers

up vote 13 down vote accepted

First off this may or may not apply to you (I'm answering for any future readers who ask the same question), but I'd recommend getting a solid grasp of Ruby before you start learning a framework.

That being said, here's my thoughts on both frameworks for a beginner.

Sinatra is the easiest to get something working. You can get hello world, and very simple sites going with very little code.

However, once you get past that into moderately complex applications, you'll need to start adding stuff that comes baked into Rails. For a beginner that can be a bit daunting.

I'd check out Michael Hartl's Rails tutorial http://ruby.railstutorial.org/ for more hands on Rails information.

share|improve this answer
7  
+1 for learning the fundamentals of the language first without any framework –  tcrosley Aug 15 '11 at 10:33
add comment

I think it's better to start with Rails (BTW I know and like both Rails and Sinatra). Rails is certainly bigger and more complex than Sinatra, but it's easier to use and there's a smaller chance that you get stuck on something (at least from my experience).

Rails handles elegantly most of the common problems you are likely to encounter during application development, in Sinatra the solution will usually require extra effort, searching though documentation and internet. For example: exporting to xml or json.

I'd recommend this tutorial as a a starting point: Ruby on Rails Guides: Getting Started with Rails.

If you decide to start with Sinatra, the best information sources are official README and Sinatra Book.

share|improve this answer
add comment

Stick with Rails; you'll learn more overall as a beginner to Ruby. When you've learned enough and/or run into the walls that can happen when working with Rails, then look at a more freeform framework like Sinatra. If you start with Sinatra first, you'll have to do most everything yourself and as a beginner that can be fairly daunting and frustrating.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.