Rack (Webserver-Interface)
stellt eine minimale, modulare und adaptive Schnittstelle für die Entwicklung von Webapplikationen in der Programmiersprache Ruby bereit Aus Wikipedia, der freien Enzyklopädie
Rack stellt eine minimale, modulare und adaptive Schnittstelle für die Entwicklung von Webapplikationen in der Programmiersprache Ruby bereit. Durch das Wrappen von HTTP-Requests und HTTP-Responses, das auf möglichst einfache Weise erfolgt, vereinheitlicht es die Schnittstelle für Webserver, Webframeworks und die Software dazwischen, die Middleware, und destilliert diese Zugriffe zu einem einzigen Methodenaufruf.
Rack: ein Ruby-Webserver-Interface | |
---|---|
![]() | |
Basisdaten | |
Entwickler | Leah Neukirchen; James Tucker, Michael Fellinger, Konstantin Haase, Aaron Patterson |
Aktuelle Version | 1.5.2 (7. Februar 2013) |
Betriebssystem | plattformunabhängig |
Programmiersprache | Ruby |
Kategorie | Middleware |
Lizenz | MIT License |
rack.github.io |
Rack wird in fast allen Webframeworks und Weblibraries in der Ruby-Welt benutzt, z. B. von Ruby On Rails und Sinatra. Es ist als Ruby Gem verfügbar.[1]
Rack stellt in der Ruby-Welt einen De-facto-Standard der Rack-Kompatibilität (englisch "rack-compliant") dar[2] und hat bereits ein Framework in der JavaScript-Welt (jackjs)[3] und eines in der Perl-Welt (Plack) inspiriert.
Beispielapplikation
Eine Rack-kompatible "Hello World"-Applikation in Ruby syntax:
require 'rack'
app = Proc.new do |env|
body = "Hello, World!"
['200', {'Content-Type' => 'text/html', 'Content-Length' => body.length.to_s}, [body]]
end
Rack::Handler::WEBrick.run app
Siehe auch
- Web Server Gateway Interface (Python)
- Perl Web Server Gateway Interface
- Python Paste
- FastCGI
- Servlet (Java)
- Server-side JavaScript
- Apache JServ Protocol
- Internet Communications Engine
- Etch (Protokoll) (Cisco)
- Internet Server API (Microsoft)
- Ring (Clojure)
Weblinks
Einzelnachweise
Wikiwand - on
Seamless Wikipedia browsing. On steroids.