Im confused about Sinatra (the ruby framework).
Is it a lightweight Rails replacement or you can have them running side by side?
Can you do a web application (as in Rails)? For example a twitter clone?
Sinatra is much more lightweight, needs less resources, and does fewer things out of the box. Rails on the other hand is packed with features, comes with a ton of code, and makes it very easy to build complicated web applications in limited time, if you know how to use it.
Sinatra is a free and open source software web application library and domain-specific language written in Ruby. It is an alternative to other Ruby web application frameworks such as Ruby on Rails, Merb, Nitro, and Camping. It is dependent on the Rack web server interface. It is named after musician Frank Sinatra.
Sinatra is not Rails. It is a micro-framework used for simple websites where you may need to just define a few actions. You can make a Sinatra application as complex as you want to, but you'll hit a point where you code has become a crazy mess sooner than with Rails.
While not 100% accurate, Sinatra fits mostly into the Page Controller architectural pattern, and Rails is a clear MVC implementation.
To answer your questions specifically:
We're currently using Sinatra for a production project (not deployed live yet, still in dev).
Basically it's wrapping around a database used by a legacy app, and exposing REST web services to other apps internally so they can interact with the legacy app without having to access the DB directly.
Rails was considered, but not used because:
Given these requirements Rails is usable, but overkill, where as Sinatra hits the spot nicely.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With