Sinatra (ruby) was quite popular gem few years ago, however after having fun chat with Eric Silverberg last weekend in NYC @scruffapp ;)) hey mate! ;)) where they have Sinatra.rb and their made me reviewing this technology trying to figure out what are the major benefits versus other popular thing like Rails (or Ruby on Rails).
Well, both are having their niches and are good fit in certain cases. I am now fan of both!
Sinatra is the way easier and lighter than RoR!
http queries are the very first thing you start seeing when Sinatring your App
Quick example of Hello World:
$ gem install sinatra
$ mkdir sinatra
$ cd sinatra
$ touch sinatra.rb
And having the following:
get '/' do
$ ruby sinatra.rb
== Sinatra (v1.4.7) has taken the stage on 4567 for development with backup from Thin
Thin web server (v1.7.0 codename Dunder Mifflin)
Maximum connections set to 1024
Listening on localhost:4567, CTRL+C to stop
::1 - - [13/Aug/2016:10:11:24 +0300] "GET / HTTP/1.1" 200 12 0.0094
Ready to serve and this is just few minutes! I am sure this is good for those who need lightweight server side!