Sinatra (software)

Sinatra
Original author(s) Blake Mizerany
Developer(s) Konstantin Haase
Initial release 9 September 2007 (2007-09-09)
Stable release 1.4.6 / 23 March 2015 (2015-03-23)
Written in Ruby
Operating system Cross-platform
Type Web application framework
License MIT License
Website www.sinatrarb.com

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.

Designed and developed by Blake Mizerany, Sinatra is small and flexible. It does not follow the typical model–view–controller pattern used in other frameworks, such as Ruby on Rails. Instead, Sinatra focuses on "quickly creating web-applications in Ruby with minimal effort."[1]

Some notable companies and institutions that use Sinatra include Apple,[2] BBC,[3] the British Government's Government Digital Service,[4] LinkedIn,[5] the National Security Agency,[6] Engine Yard, Heroku, GitHub,[7] and Songbird.[8] Travis CI provides much of the financial support for Sinatra's development.[9]

Sinatra was created and open-sourced in 2007.

Example

#!/usr/bin/env ruby
require 'sinatra'

get '/' do
  redirect to('/hello/World')
end

get '/hello/:name' do
  "Hello #{params[:name]}!"
end

References

Further reading

External links

This article is issued from Wikipedia - version of the Wednesday, February 10, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.