Jump to content
Wikipedia The Free Encyclopedia

Sinatra (software)

From Wikipedia, the free encyclopedia
Web microframework for Ruby
Sinatra
Original author Blake Mizerany
Developer Konstantin Haase
Initial release9 September 2007 (2007年09月09日)
Stable release
3.0.2[1]  Edit this on Wikidata / 1 October 2022; 3 years ago (1 October 2022)
Repository Sinatra Repository
Written inRuby
Operating system Cross-platform
Type Web application framework
License MIT License
Websitesinatrarb.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] Because of much smaller size compared to Ruby on Rails, it is also called microframework.[5]

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

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.[5] [13]

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

Example

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

References

[edit ]
  1. ^ https://github.com/sinatra/sinatra/tags. {{cite web}}: Missing or empty |title= (help)
  2. ^ "Taking the Stage - Sinatra: Up and Running". Safaribooksonline.com. Retrieved 2016年10月21日.
  3. ^ a b Sinatra: About
  4. ^ Sinatra: Readme
  5. ^ a b Carlson, Lucas; Richardson, Leonard (2015). Ruby Cookbook: Recipes for Object-Oriented Scripting. O'Reilly Media. ISBN 9781449373696.
  6. ^ Open Source software used by Apple
  7. ^ BBC Zeitgeist Archived 2010年11月28日 at the Wayback Machine
  8. ^ O'Reilly radar: With GOV.UK, British government redefines the online government platform
  9. ^ JRubyfying LinkedIn's Front-end
  10. ^ NSA Careers: The Programmer Archived 2013年12月16日 at the Wayback Machine
  11. ^ "Open Source (Almost) Everything". 22 November 2011. Retrieved 16 January 2015.
  12. ^ Sinatra in The Wild
  13. ^ Save Data Automatically with Ruby on Rails , retrieved 2022年05月11日
  14. ^ Confreaks: RubyConf 2008 Archived 2009年03月31日 at the Wayback Machine

Further reading

[edit ]
[edit ]
.NET
C++
ColdFusion
Common Lisp
Haskell
Java
JavaScript
Perl
PHP
Python
Ruby
Rust
Scala
Smalltalk
Other languages

AltStyle によって変換されたページ (->オリジナル) /