First a brief overview of the big parts of Arrow you are likely to hear about later on in the tutorial.
The term application, used in the Arrow documentation, refers to a overarching group of functionality like a CMS, an online customer service interface, online event-management, or something similar. Arrow was created to allow developers to create large generic applications for the web which are easily tailored to a specific installation’s requirements. Each application is assembled out of small, loosely-coupled Applet objects, which can be combined, re-arranged, swapped out, or subclassed to provide branding, custom features, or other customization with a minimum of time and effort.
To facilitate this loose coupling, the design of Arrow is somewhat different than many other popular web frameworks, which all more-or-less follow the Recursive Model-View-Controller aggregate pattern. Arrow is designed around the Supervising Controller pattern with a Passive View, which in simple terms means that the Controller plays a bigger role in the presentation of results to the user, reducing or eliminating the coupling between any DomainModel classes and the View. This is accomplished through some deliberate design decisions:
An Arrow blogging application might look conceptually something like this:
The Dispatcher is the mod_ruby request handler that is invoked by Apache; it loads the configuration (or reloads it if it has changed since the last time it was read), sets up the Broker, creates Transaction objects for each incoming request, sends the response headers, and renders the resulting output.
A new Transaction object is created by the Dispatcher for each request, and then passed to the
Broker for handling. It encapsulates the incoming Apache::Request
object, providing easy access to
request values, configuration values, session data, and validated query arguments.
The Broker decides how Transaction objects get handled by loading and building a registry of Applet
objects. When the transaction calls its #delegate
method with a Transaction object, it searches
its Registry for applets which have been mapped to all or part of the incoming request’s URI.
Applets are objects which handle user requests, and define the basic logic of different parts of the application. They can also be combined to run in sequence via delegation (aka chaining). The writing of custom Applets is where nearly all of the development work will happen while creating an application under Arrow.
The default classes provide enough functionality to create a fairly large number of different kinds of applications, but they are all designed with subclassing in mind, so if you don’t like the way something behaves, it should be fairly easy to customize.