Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts

Sinatra 1.0 Released: Major Milestone for Ruby's Best Webapp DSL

72% Upvoted
This thread is archived
New comments cannot be posted and votes cannot be cast
level 1

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?

level 2
8 points · 8 years ago

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.

level 3

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.

level 3

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

level 2
1 point · 8 years ago

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.

Community Details





Computer Programming

Create Post
r/programming Rules
Keep submissions on topic and of high quality
No surveys
No résumés/job listings
/r/programming is not a support forum

Related reddits

Specific languages

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.