Sinatra (software)

From Wikipedia, the free encyclopedia
(Redirected from Sinatra (web framework))
Jump to navigation Jump to search
Sinatra
Original authorBlake Mizerany
DeveloperKonstantin Haase
Initial release9 September 2007 (2007-09-09)
RepositorySinatra Repository
Written inRuby
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemCross-platform
    TypeWeb application framework
    LicenseMIT License
    Websitesinatrarb.com

    Sinatra is a free and open source software web application library and domain-specific language[1] 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.[2]

    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."[3] Because of much smaller size compared to Ruby on Rails, it is also called microframework.[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] Stripe, and Songbird.[11] Travis CI provides much of the financial support for Sinatra's development.[2]

    Sinatra was created and open-sourced in 2007. It inspired multiple ports and similar projects in other programming languages, such as Express.js and Scalatra.[4][12]

    Mizerany and Heroku's Adam Wiggins introduced and discussed Sinatra at RubyConf 2008.[13]

    Example

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

    References

    [edit | edit source]
    1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ a b Sinatra: About
    3. ^ Sinatra: Readme
    4. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ Open Source software used by Apple
    6. ^ BBC Zeitgeist Archived 2010-11-28 at the Wayback Machine
    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 Archived 2013-12-16 at the Wayback Machine
    10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    11. ^ Sinatra in The Wild
    12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    13. ^ Confreaks: RubyConf 2008 Archived 2009-03-31 at the Wayback Machine

    Further reading

    [edit | edit source]
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    [edit | edit source]
    • Lua error in Module:Official_website at line 94: attempt to index field 'wikibase' (a nil value).