Arrow is a web application framework for mod_ruby, a module for the Apache webserver that exposes most of the server’s module API to Ruby via an embedded interpreter.
It features:
For more information about Arrow’s history and design, see Arrow’s History and Design Philosophy.
Here’s the obligatory “Hello World” example:
1 #!/usr/bin/ruby 2 3 require 'arrow/applet' 4 5 class HelloWorldApplet < Arrow::Applet 6 7 default_action :hello 8 9 def hello_action( txn, *args ) 10 return "<html><head><title>Hello, World</title></head>" + 11 "<body><h1>Hello, World</h1></body></html>" 12 end 13 14 end
The output from this will be something like:
Before you can get started, you have to install and configure some stuff. Nothing too tricky.
Once you have things up and running, you can start writing Ruby.
Arrow has full API documentation.
Once the tutorial is a bit more complete, we’ll start putting together some recipes for common
tasks. For now, though, we suggest you take a look at the example applets in the applets/
directory of the distribution, and their corresponding templates in the templates/
directory.