Sinatra (software) explained

Sinatra
Author:Blake Mizerany
Developer:Konstantin Haase
Operating System:Cross-platform
Programming Language:Ruby
Genre:Web application framework
License:MIT License

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.

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]

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

Example

  1. !/usr/bin/env ruby

require 'sinatra'

get '/' do redirect to('/hello/World')end

get '/hello/:name' do "Hello #!"end

Further reading

Notes and References

  1. Web site: Taking the Stage - Sinatra: Up and Running . Safaribooksonline.com . 2016-10-21.
  2. http://sinatrarb.com/about.html Sinatra: About
  3. http://www.sinatrarb.com/intro.html Sinatra: Readme
  4. Book: Lucas . Carlson . Leonard . Richardson . Ruby Cookbook: Recipes for Object-Oriented Scripting . O'Reilly Media . 2015 . 9781449373696 .
  5. https://www.apple.com/opensource/ Open Source software used by Apple
  6. http://thechangelog.com/post/1205495359/zeitgeist-twitter-zeitgeist BBC Zeitgeist
  7. http://radar.oreilly.com/2012/01/with-govuk-british-government.html O'Reilly radar: With GOV.UK, British government redefines the online government platform
  8. https://www.youtube.com/watch?v=qZcmF3yonjs JRubyfying LinkedIn's Front-end
  9. http://www.nsa.gov/public_info/media_center/careers/video/TheProgrammer/index.html NSA Careers: The Programmer
  10. Web site: Open Source (Almost) Everything . 22 November 2011 . 16 January 2015.
  11. http://www.sinatrarb.com/wild.html Sinatra in The Wild
  12. http://rubyconf2008.confreaks.com/lightweight-web-services.html Confreaks: RubyConf 2008