Rack (Webserver-Interface)
| Rack: ein Ruby-Webserver-Interface
| |
|---|---|
| colspan="2" class="notheme" style="text-align:center; background:#Vorlage:Standardfarbe; color:#202122;" | Logo | |
| Basisdaten
| |
| Maintainer | Lua-Fehler in Modul:Wikidata, Zeile 1686: attempt to index field 'wikibase' (a nil value) |
| Entwickler | Leah Neukirchen; James Tucker, Michael Fellinger, Konstantin Haase, Aaron Patterson |
| Erscheinungsjahr | Lua-Fehler in Modul:Wikidata, Zeile 1686: attempt to index field 'wikibase' (a nil value) |
| Aktuelle Version | 1.5.2 (7. Februar 2013) |
| Aktuelle Vorabversion | Lua-Fehler in Modul:Wikidata, Zeile 1686: attempt to index field 'wikibase' (a nil value) (Lua-Fehler in Modul:Wikidata, Zeile 1686: attempt to index field 'wikibase' (a nil value)) |
| Betriebssystem | plattformunabhängig |
| Programmiersprache | Ruby |
| Kategorie | Middleware |
| Lizenz | MIT License |
| rack.github.io | |
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 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.<ref>https://rubygems.org/gems/rack/</ref>
Rack stellt in der Ruby-Welt einen De-facto-Standard der Rack-Kompatibilität ({{Modul:Vorlage:lang}} Modul:Vorlage:lang:103: attempt to index field 'wikibase' (a nil value)) dar<ref>rubyinside.com</ref> und hat bereits ein Framework in der JavaScript-Welt (jackjs)<ref><templatestyles src="Webarchiv/styles.css" />jackjs.org ( des Vorlage:IconExternal vom 17. Dezember 2014 im Internet Archive) Info: Der Archivlink wurde automatisch eingesetzt und noch nicht geprüft. Bitte prüfe Original- und Archivlink gemäß Anleitung und entferne dann diesen Hinweis.</ref> und eines in der Perl-Welt (Plack) inspiriert.
Beispielapplikation
Eine Rack-kompatible "Hello World"-Applikation in Ruby syntax: <syntaxhighlight lang="ruby"> 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 </syntaxhighlight>
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
- Rack Project
- Rack Schnittstellenspezifikation
- Rack wiki github
- Rack at Google Groups
- Rack-compliant applications
- Thin Ruby web server
- The introductory blog post
- Rack Yehuda Katz
- Rack coding contest
- jackjs, a JavaScript clone of Rack
Einzelnachweise
<references />
<templatestyles src="Erweiterte Navigationsleiste/styles legacy.css" />Vorlage:Klappleiste/Anfang
| Protokolle | |
| APIs |
C NSAPI | C ASAPI | C ISAPI | Jakarta Servlet | ASP.NET | Python WSGI | Ruby Rack | JavaScript JSGI | PSGI | Lua WSAPI |
| Apache-Module |
mod_jk | mod_lisp | mod_parrot | mod_perl | mod_php | mod_python | mod_wsgi | mod_ruby | Phusion Passenger |
| Web APIs |