This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]landofdown 3 points4 points  (4 children)

I'll ask the obvious question: how does it compare to Rails? What kind of apps is Sinatra better suited for, and for which ones should I use Rails instead?

[–]solak 6 points7 points  (2 children)

Sinatra is much more lightweight.

  • You need full-blown framework: Rails
  • You need basic features and minimal footprint: Sinatra

Sinatra is great, by the way.

[–]mechazoidal 1 point2 points  (0 children)

It's also easy to pull in other libraries that you'd like without the Rails stack making your decisions. At my job, I used it for a simple proof-of-concept ad server that only used ActiveRecord, Thinking Sphinx, Paperclip, HAML, and Treetop. All it does is listen for PUTs from the ad database, parse/store/index them, and then offer up a minimal parameter-based view.

[–]econnerd 1 point2 points  (0 children)

Not to mention that you can put a Sinatra app inside a rails app by sticking it in /lib

[–]zem 0 points1 point  (0 children)

one of the speakers at rubyconfindia put it well: when developing your app, use sinatra, because it's a joy to work with. when moving into production, start migrating to rails, because you'll need to add a lot of functionality that rails will have plugins available for.