World Library  
Flag as Inappropriate
Email this Article

Rack (web server interface)

Article Id: WHEBN0022047335
Reproduction Date:

Title: Rack (web server interface)  
Author: World Heritage Encyclopedia
Language: English
Subject: JSGI, Merb, Camping (microframework), Common Gateway Interface, Comparison of web application frameworks
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Rack (web server interface)

Rack, a Ruby Webserver Interface
Original author(s) Christian Neukirchen
Developer(s) James Tucker, Josh Peek, José Valim, Michael Fellinger, Aaron Patterson, Santiago Pastorino, Konstantin Haase
Stable release 1.5.1 / January 28, 2013 (2013-01-28)
Operating system Cross-platform
Type Middleware
License MIT License
Website .io.githubrack

Rack provides a modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses it unifies the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call.

Rack is used by many Ruby web frameworks and libraries, such as Ruby On Rails and Sinatra. It is available as a Ruby Gem.

Rack has already inspired a JavaScript framework[1] (jackjs) and a Perl one (Plack), a Common Lisp one[2] (Clack), and has resulted in the Ruby developer quasi-standard of "rack-compliant".[3]

It was also cited as an inspiration for OWIN.[4]

Example application

A Rack-compatible "Hello World" application in Ruby syntax:

app = lambda do |env|
  body = "Hello, World!"
  [200, {"Content-Type" => "text/plain", "Content-Length" => body.length.to_s}, [body]]
end

run app

See also

References

  1. ^ jack - introduction. Jackjs.org. Retrieved on 2013-09-20.
  2. ^ clacklisp.org. Retrieved on 2014-10-17.
  3. ^ Pancake: How To Stack and Loosely Couple Rack-Based Webapps Together. Rubyinside.com (2009-12-04). Retrieved on 2013-09-20.
  4. ^ http://www.asp.net/aspnet/overview/owin-and-katana/an-overview-of-project-katana Asp.net. Retrieved on 2014-10-01.

External links

  • Official website


This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 



Copyright © World Library Foundation. All rights reserved. eBooks from Hawaii eBook Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.