When people speak of Ruby web development, it has historically been in reference to
the opinionated juggernaut that is Rails. This is certainly not an unfounded association;
Hulu, Yellow Pages, Twitter, and countless others have relied on Rails to power their
(often massive) web presences, and Rails facilitates that process with zeal.
Why, then, are people so interested in Sinatra, the tiny little domain-specific language
that could?
Rails was a breath of fresh air to many developers exhausted by the “old ways”; Sinatra
enters the arena with a similar game-changer: a beautifully minimalistic, “I’ll get out
of your way” approach. No generators, no complex folder hierarchies, and a brief yet
expressive syntax that maps closely to the functionality exposed by the Hypertext
Transfer Protocol verbs.
In short, Sinatra is for classy web development.
Our goal is to provide the core concepts and accompanying examples to help you feel
comfortable using Sinatra as quickly as possible. By the end, you should have a working
knowledge of Sinatra and how it fits into the larger Ruby web development ecosystem.
You should know when Sinatra will get the job done quickly and when it might be
better to lean on Rails, Padrino, or similar frameworks. You should also have a better
sense of the internals of Sinatra, as well as the Rack specification and accompanying
gem.