Sinatra (software)

Last updated
Sinatra
Original author(s) Blake Mizerany
Developer(s) Konstantin Haase
Initial release9 September 2007 (2007-09-09)
Stable release
3.0.2 [1]   OOjs UI icon edit-ltr-progressive.svg / 1 October 2022;8 months ago (1 October 2022)
Repository Sinatra Repository
Written in Ruby
Operating system Cross-platform
Type Web application framework
License MIT License
Website www.sinatrarb.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]

Contents

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

#!/usr/bin/env rubyrequire'sinatra'get'/'doredirectto('/hello/World')endget'/hello/:name'do"Hello #{params[:name]}!"end

Related Research Articles

<span class="mw-page-title-main">Yukihiro Matsumoto</span> Japanese computer scientist (born 1965)

Yukihiro Matsumoto, also known as Matz, is a Japanese computer scientist and software programmer best known as the chief designer of the Ruby programming language and its original reference implementation, Matz's Ruby Interpreter (MRI). His demeanor has brought about a motto in the Ruby community: "Matz is nice and so we are nice," commonly abbreviated as MINASWAN.

Cocoa is Apple's native object-oriented application programming interface (API) for its desktop operating system macOS.

Object Pascal is an extension to the programming language Pascal that provides object-oriented programming (OOP) features such as classes and methods.

<span class="mw-page-title-main">Ruby on Rails</span> Server-side open source web application framework

Ruby on Rails is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web pages. It encourages and facilitates the use of web standards such as JSON or XML for data transfer and HTML, CSS and JavaScript for user interfacing. In addition to MVC, Rails emphasizes the use of other well-known software engineering patterns and paradigms, including convention over configuration (CoC), don't repeat yourself (DRY), and the active record pattern.

JRuby is an implementation of the Ruby programming language atop the Java Virtual Machine, written largely in Java. It is free software released under a three-way EPL/GPL/LGPL license. JRuby is tightly integrated with Java to allow the embedding of the interpreter into any Java application with full two-way access between the Java and the Ruby code.

<span class="mw-page-title-main">Capistrano (software)</span>

Capistrano is an open-source tool for running scripts on multiple servers; its main use is deploying web applications. It automates the process of making a new version of an application available on one or more web servers, including supporting tasks such as changing databases.

CherryPy is an object-oriented web application framework using the Python programming language. It is designed for rapid development of web applications by wrapping the HTTP protocol but stays at a low level and does not offer much more than what is defined in RFC 7231.

<span class="mw-page-title-main">David Heinemeier Hansson</span> Programmer, racing driver, creator of Ruby on Rails

David Heinemeier Hansson is a Danish programmer, and the creator of the popular Ruby on Rails web development framework and the Instiki wiki. He is also a partner at the web-based software development firm 37signals.

A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and deploy web applications on the World Wide Web. Web frameworks aim to automate the overhead associated with common activities performed in web development. For example, many web frameworks provide libraries for database access, templating frameworks, and session management, and they often promote code reuse. Although they often target development of dynamic web sites, they are also applicable to static websites.

WEBrick is a Ruby library providing simple HTTP web servers. It uses basic access authentication and digest access authentication for different kinds of servers that it can create - HTTP based server, HTTPS server, proxy server and virtual-host server. Construction of several non-HTTP servers such as the Day Time Server which uses the Daytime Protocol rather than the HTTP is also facilitated by WEBrick. It is used by the Ruby on Rails and Padrino frameworks to test applications in a development environment as well as production mode for small loads. It is now a part of Ruby standard library.

why the lucky stiff Artist and computer programmer

Jonathan Gillette, known by the pseudonym why the lucky stiff, is a writer, cartoonist, artist, and programmer notable for his work with the Ruby programming language. Annie Lowrey described him as "one of the most unusual, and beloved, computer programmers" in the world. Along with Yukihiro Matsumoto and David Heinemeier Hansson, he was seen as one of the key figures in the Ruby community. His pseudonym might allude to the exclamation "Why, the lucky stiff!" from The Fountainhead by Ayn Rand.

IronRuby is an implementation of the Ruby programming language targeting Microsoft .NET Framework. It is implemented on top of the Dynamic Language Runtime (DLR), a library running on top of the Common Language Infrastructure that provides dynamic typing and dynamic method dispatch, among other things, for dynamic languages.

MonoRail, a component of the Castle Project, is an open source web application framework built on top of the ASP.NET platform. Inspired by Ruby on Rails Action Pack, MonoRail differs from standard ASP.NET Web Forms development by enforcing separation of concerns using a model–view–controller (MVC) architecture. The framework is commonly used in conjunction with Castle ActiveRecord, an ORM layer built on NHibernate. In January 2010, version 2.0 of MonoRail was released, however, many projects use the trunk version of the source to take advantage of new features without waiting for official releases.

<span class="mw-page-title-main">Richard Kilmer</span>

Richard Kilmer is a technology entrepreneur, software programmer and conference host and speaker in the open-source software community. He is an open-source contributor and developer of commercial software applications built in Ruby and Flash. His best known open-source software creation is of RubyGems, a package manager for the Ruby programming language most commonly used in downloads and deployments of the Ruby on Rails web application framework. He is currently the Co-Founder and CEO of CargoSense, Inc.

<span class="mw-page-title-main">Lift (web framework)</span>

Lift is a free and open-source web framework that is designed for the Scala programming language. It was originally created by David Pollak who was dissatisfied with certain aspects of the Ruby on Rails framework. Lift was launched as an open source project on 26 February 2007 under the Apache License 2.0. A commercially popular web platform often cited as being developed using Lift is Foursquare.

<span class="mw-page-title-main">Rack (web server interface)</span> API specification for web applications in programming language Ruby

Rack is a modular interface between web servers and web applications developed in the Ruby programming language. With Rack, application programming interfaces (APIs) for web frameworks and middleware are wrapped into a single method call handling HTTP requests and responses.

<span class="mw-page-title-main">Play Framework</span> Open-source web framework written in Scala

Play Framework is an open-source web application framework which follows the model–view–controller (MVC) architectural pattern. It is written in Scala and usable from other programming languages that are compiled to JVM bytecode, e.g. Java. It aims to optimize developer productivity by using convention over configuration, hot code reloading and display of errors in the browser.

Mirah has been a programming language based on Ruby language syntax, local type inference, hybrid static–dynamic type system, and a pluggable compiler toolchain. Mirah was created by Charles Oliver Nutter to be "a 'Ruby-like' language, probably a subset of Ruby syntax, that [could] compile to solid, fast, idiomatic JVM bytecode." The word mirah refers to the gemstone ruby in the Javanese language, a play on the concept of Ruby in Java.

<span class="mw-page-title-main">Scalatra</span>

Scalatra is a free and open source web application framework written in Scala. It is a port of the Sinatra framework written in Ruby. Scalatra is an alternative to the Lift, Play!, and Unfiltered frameworks.

James Nolan Weirich was a software developer, speaker, teacher, and contributor to the Ruby programming language community. He was active in the Ruby community worldwide, speaking at events in Asia, South America, Europe, and the United States.

References

  1. Error: Unable to display the reference properly. See the documentation for details.
  2. "Taking the Stage - Sinatra: Up and Running". Safaribooksonline.com. Retrieved 2016-10-21.
  3. 1 2 Sinatra: About
  4. Sinatra: Readme
  5. 1 2 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