When comparing Sinatra vs Rack, the Slant community recommends Sinatra for most people. In the question“What are the best Ruby web frameworks?” Sinatra is ranked 2nd while Rack is ranked 3rd. The most important reason people chose Sinatra is:
Since it has very few dependencies, the loading time for a Sinatra app is considerably small.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Small loading time
Since it has very few dependencies, the loading time for a Sinatra app is considerably small.
Pro Has only the bare minimum needed
Sinatra has taken an approach of having only the most useful components needed to build applications out of the box. It has simple routes along with a Domain Specific Language over a Rack layer.
Pro Separates concerns
Rack is great at separating the different stages of a request, allowing developers to easily follow separation of concerns, a key goal for any well designed software.
Pro Great ecosystem
There's a great community and ecosystem built around Rack. You can easily find pre-built components to do almost anything you are planning to.
Cons
Con Hard to scale well
Because it's rather small and minimalistic, scaling up is not very easy with Sinatra. You need a great deal of knowledge on libraries and modules that may be useful for your particular use-case. As your application grows larger it may be hard to keep things clean and minimalistic, losing a lot of the advantages that Sinatra has.
Con Not great for large complex applications
Rack is a very bare-bones middleware useful for easily creating REST APIs without too many bells and whistles. As such, it may prove useless to build a complex web application that relies on the backend for most of its operations with Rack.