Jump to content

Sinatra (software)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Crebby (talk | contribs) at 03:24, 8 May 2017 (updated to v2.0.0). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Sinatra
Original author(s)Blake Mizerany
Developer(s)Konstantin Haase
Initial release9 September 2007 (2007-09-09)
Stable release
2.0.0[1] / 7 May 2017; 7 years ago (2017-05-07)
Repository
Written inRuby
Operating systemCross-platform
TypeWeb application framework
LicenseMIT License
Websitewww.sinatrarb.com

Sinatra is a free and open source software web application library and domain-specific language[2] 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. It is named after musician Frank Sinatra.[3]

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."[4]

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

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

  1. ^ [1]
  2. ^ "Taking the Stage - Sinatra: Up and Running". Safaribooksonline.com. Retrieved 2016-10-21.
  3. ^ Sinatra: About
  4. ^ Sinatra: Readme
  5. ^ Open Source software used by Apple
  6. ^ BBC Zeitgeist
  7. ^ O'Reilly radar: With GOV.UK, British government redefines the online government platform
  8. ^ JRubyfying LinkedIn's Front-end
  9. ^ NSA Careers: The Programmer
  10. ^ "Open Source (Almost) Everything". 22 November 2011. Retrieved 16 January 2015.
  11. ^ Sinatra in The Wild
  12. ^ Sinatra: About

Further reading

External links