Software:Sinatra
Original author(s) | Blake Mizerany |
---|---|
Developer(s) | Konstantin Haase |
Initial release | 9 September 2007 |
Repository | Sinatra 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[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
#!/usr/bin/env ruby require 'sinatra' get '/' do redirect to('/hello/World') end get '/hello/:name' do "Hello #{params[:name]}!" end
References
- ↑ "Taking the Stage - Sinatra: Up and Running". Safaribooksonline.com. https://www.safaribooksonline.com/library/view/sinatra-up-and/9781449306847/ch01.html.
- ↑ 2.0 2.1 Sinatra: About
- ↑ Sinatra: Readme
- ↑ 4.0 4.1 Carlson, Lucas; Richardson, Leonard (2015). Ruby Cookbook: Recipes for Object-Oriented Scripting. O'Reilly Media. ISBN 9781449373696. https://books.google.com/books?id=oRqkBwAAQBAJ&q=Sinatra+microframework&pg=PA679.
- ↑ 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
- ↑ "Open Source (Almost) Everything". 22 November 2011. http://tom.preston-werner.com/2011/11/22/open-source-everything.html.
- ↑ Sinatra in The Wild
- ↑ Save Data Automatically with Ruby on Rails, https://aristeksystems.com/blog/ror-autosave-data-function/#how, retrieved 2022-05-11
- ↑ Confreaks: RubyConf 2008
Further reading
- Harris, Alan; Haase, Konstantin (November 2011). Sinatra: Up And Running (First ed.). O'Reilly Media. p. 120. ISBN 978-1-4493-0423-2. http://oreilly.com/catalog/0636920019664/.
- Harper, Dan. "Singing with Sinatra — nettuts". http://net.tutsplus.com/tutorials/ruby/singing-with-sinatra/.
- "Sinatra Book". https://sinatra-org-book.herokuapp.com/.
External links