Sinatra (software)
![]() | |
Original author(s) | Blake Mizerany |
---|---|
Developer(s) | Konstantin Haase |
Initial release | 9 September 2007 |
Stable release | 1.4.5
/ 8 April 2014 |
Repository | |
Written in | Ruby |
Operating system | Cross-platform |
Type | Web application framework |
License | MIT License |
Website | www |
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
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.
- Ruby: Almost Sinatra,[10] Astaire,[11] Cuba,[12] Padrino (based on Sinatra),[13] Pakyow,[14] Renee,[15] Scorched,[16] Nancy[17]
- PHP: Fat-Free Framework, Fitzgerald,[18] Glue,[19] klein,[20] Laravel,[21] Limonade,[22] MiMViC,[23] Silex,[24] Slim,[25] ToroPHP [26], Zaphpa [27]
- JavaScript: Express,[28] Picard,[29] Roundabout,[30] Sammy[31]
- CoffeeScript: Zappa[32]
- Dart: Start[33]
- Python: Bottle,[34] Denied[35] (was an April Fools joke),[36] Flask,[37] itty,[38] Juno[39]
- Erlang: Fresh,[40] Spooky,[41] Leptus[42]
- Go: Martini,[43][44] Goji[45]
- Groovy: Graffiti,[46] Ratpack[47]
- Scala: Finatra [48] Scalatra,[49] BlueEyes,[50]
- .NET: Martin,[51] Nancy [52] Nina[53]
- Perl: Dancer, Mojolicious[54]
- Java: Spark,[55] Napalm,[56] Htmleasy[57]
- Haskell: Bird,[58] Miku,[59] Scotty[60]
- Fancy: Sinatra.fy[61]
- Bash: Astley,[62] sh.inatra[63]
- C: Bogart [64]
- C++: Garland [65]
- F#: Frank[66]
- Lua: Mercury,[67] Orbit[68]
- Mirah: Shatner[69]
- Objective-C: RCRouter[70]
- Vala: Valatra[71]
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.[72]
References
- ^ Sinatra: Readme
- ^ Open Source software used by Apple
- ^ BBC Zeitgeist
- ^ O'Reilly radar: With GOV.UK, British government redefines the online government platform
- ^ JRubyfying LinkedIn's Front-end
- ^ NSA Careers: The Programmer
- ^ [1]
- ^ Sinatra in The Wild
- ^ Sinatra: About
- ^ Almost Sinatra
- ^ Astaire
- ^ Cuba
- ^ Padrino
- ^ Pakyow
- ^ Renee
- ^ Scorched
- ^ Nancy
- ^ Fitzgerald
- ^ Glue
- ^ klein
- ^ Laravel
- ^ Limonade
- ^ MiMViC
- ^ Silex
- ^ Slim
- ^ [2]
- ^ [3]
- ^ Express
- ^ Picard
- ^ Roundabout
- ^ Sammy
- ^ Zappa
- ^ https://github.com/lvivski/start
- ^ Bottle
- ^ Denied
- ^ Armin Ronacher: April 1st Post Mortem
- ^ Flask
- ^ itty
- ^ Juno
- ^ Fresh
- ^ Spooky
- ^ Leptus
- ^ Martini
- ^ The "About" specifically mentions Sinatra as an inspiration
- ^ Goji
- ^ Graffiti
- ^ Ratpack
- ^ Finatra
- ^ Scalatra
- ^ BlueEyes
- ^ Martin
- ^ Nancy
- ^ Nina
- ^ Mojolicious::Lite
- ^ Spark
- ^ Napalm
- ^ Htmleasy
- ^ Bird
- ^ Miku
- ^ scotty
- ^ Sinatra.fy
- ^ Astley
- ^ sh.inatra
- ^ Bogart
- ^ Garland
- ^ Frank
- ^ Mercury
- ^ Orbit
- ^ Shatner
- ^ RCRouter
- ^ Valatra
- ^ "Sinatra Loves Dancer"
Further reading
- Harris, Alan; Haase, Konstantin (November 2011). "Sinatra: Up And Running" (First ed.). O'Reilly Media: 120. ISBN 978-1-4493-0423-2.
{{cite journal}}
: Cite journal requires|journal=
(help) - Millwood, Tim. "Sinatra — Millwood Online".
- Harper, Dan. "Singing with Sinatra — nettuts".
- "Sinatra Book".