new to ruby, rails3 or Sinatra? [closed]
I am evaluating Rails3 or Sinatra to build a new site. Both of them look interesting and not sure which one is better for new developer to Ruby. I heard Rails3 is used to build a website with complicated business logic, but Sinatra is more suitable for simple web. I want to build a website could be used in production, the initial business logic may be simple, but then I may add more features with more complex business logic later on. So, I'd appreciate if someone may help me out on my case. Thanks.
You also might consider building out your initial version in Sinatra, where you can really get your head around the various objects you'll be working with. Then, once you've gotten a prototype built, you could port it over to Rails relatively easily.
That being said, I think daddz's recommendation to use Padrino's a good one. I've really been enjoying Sinatra lately, and plan to build something with Padrino soon.
You should also take a look at Padrino. It is built on top of Sinatra and not as "complex" as Rails.
See the new slides for a quick overview: Padrino Slides
My advice is to go with rails3. And here are my reasons.
You may start with a small app but you will eventually add other functionalities later.
It has a large community and excellent screencasts at http://railscasts.com/
Since you are new to Ruby rails will get you interested in learning ruby and it will introduce you to the topics of DRY, TDD, MVC and Rest. It is little harder to grasp but it worth every minute you spend.
Now dont get me wrong. Sinatra is a great micro framework and specially for a good Ruby developer since it has a small base of code (about 1000 lines) so you can check out the code and learn few tricks. But like a said go with Rails and you wont be sorry.
精彩评论