talira

A DSL for quickly creating web applications in Ruby

open sourceMITfree

Sinatra is a small Ruby web framework: you map HTTP routes to blocks of code in a few lines, with no generators or required project layout, and run the app on any Rack server such as Puma. It handles routing with patterns and conditions, templates in ERB, Haml and other engines, filters, helpers and sessions. The same repository ships rack-protection, which guards against common web attacks, and sinatra-contrib, a set of common extensions.

Problems it solves

  • a tiny Ruby web framework for a small API without Rails
  • spin up a few HTTP endpoints in Ruby in one file
  • a lightweight Rack app with routes and templates

Features

  • routes in a few lines of Ruby
  • runs on any Rack server (Puma and others)
  • templates: ERB, Haml and other engines
  • filters, helpers and sessions
  • rack-protection and sinatra-contrib in the same repository

Alternatives

The same job

These do what Sinatra does.

  1. Ruby on Rails Accelerate your agents with convention over configuration.
  2. Grape REST-like API framework for Ruby
  3. Snails Rails-like framework for API-only Ruby apps that compiles to one native binary
  4. Rack The minimal interface between Ruby web servers and web frameworks, with standard middleware
  5. Hanami Ruby apps that grow with you

Compare Sinatra with the top 3