Sinatra (software)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Sinatra
Sinatralogo.png
Original author(s) Blake Mizerany
Developer(s) Konstantin Haase
Stable release 1.3.2 / December 30, 2011; 2 months ago (2011-12-30)
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 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, Camping, and Rango. 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 that is seen 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[4], LinkedIn[5], Engine Yard, Heroku, GitHub, and Songbird.[6] Heroku provides much of the financial support for Sinatra's development. [7]

Sinatra was created and open-sourced in 2007.


Contents

[edit] Example

#!/usr/bin/env ruby
require 'sinatra'
 
get '/' do
  redirect to('/hello/World')
end
 
get '/hello/:name' do
  "Hello #{params[:name]}!"
end

[edit] Frameworks inspired by Sinatra

Sinatra has inspired a lot of micro frameworks in Ruby and other programming languages. Usually such frameworks try to closely mimic the Sinatra DSL.

In July 2011, some unknown individual or group, posing as various members of the Sinatra core team, discredited the Dancer project. This incident led to the Sinatra team publicly endorsing Dancer and other clones.[59]

[edit] References

[edit] Further reading

[edit] External links

Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages