Rack (web server interface)
| Original author(s) | Christian Neukirchen |
|---|---|
| Developer(s) | James Tucker, Michael Fellinger, Konstantin Haase, Aaron Patterson |
| Stable release | 1.5.1 / January 28, 2013 |
| Operating system | Cross-platform |
| Type | Middleware |
| License | MIT License |
| Website | rack.rubyforge.org |
Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call.
Rack is used by almost all 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 project called clack, and has resulted in the Ruby developer quasi-standard of "rack-compliant".[2]
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
- Python WSGI
- Perl Web Server Gateway Interface
- Python Paste
- Smalltalk Seaside
- FastCGI
- Java Servlet
- Server-side JavaScript
- Apache JServ Protocol
- zeroc ICE
- Cisco Etch
- ISAPI Internet Server Application Programming Interface (Microsoft)
References
↑Jump back a sectionExternal links
- RubyForge: Rack Project Summary
- Rack wiki
- Rack documentation
- Rack at Google Groups
- Rack-compliant applications
- Thin Ruby web server
- The introductory blog post
- Yehuda Katz on Rack
- Rack coding contest
- jackjs, a JavaScript clone of Rack
There is a Rack IRC channel #rack at Freenode.
|
|||||||||||||||||||||||||||
