QuarterMaster

This document introduces ‘QuarterMaster’ — a Rebol-based web framework currently under development.  This document is subject to change.

The QuarterMaster Web Framework

QM Logo

QuarterMaster is a Web Framework based on the ‘Model-View-Controller’ application pattern.  It is written in Rebol and is designed 1) to have as small a footprint as it can get away with, 2) to install without effort, 3) to leverage the highly expressive Rebol messaging language.

In addition to the Introduction, there is an overview of the framework below, and some pattern recipes:

Model-View-Controller

Model

The Model component is open ended.  Built in is a flat-file database scheme called ‘RoughCut’ that is used to manage users and sessions.  RoughCut uses the ‘Active Record’ record pattern.  While RoughCut can be used to manage application data, QM is a thin web framework built on top of Rebol and as such any number of disparate systems can be bound together with the succinct Rebol messaging language.

View

The View component primarily uses Rebol Server Pages.  Therefore all stages of a QM application can be written in Rebol.

Additionally, Make-Doc can be used to treat user input with schemes that range from user interfaces to sanitised comments.

Controller

The Controller component is a simple dispatcher with authentication tests.  Included is an intuitive interface to both HTTP request and response.

Credits

QuarterMaster is brought to you in part by:

Rebol
The transformative language that makes QM possible.
Rebol Developers
Too many individuals to name drop, but the Mailing List and AltME forum are invaluable sources of rapid, insightful and friendly feedback.
Vanilla
A masterful bliki (blog/wiki) that influenced many of QM’s original goals.

QuarterMaster in Action

A sample QuarterMaster application.

http://example.com/widgets/list

%/models/widgets.r

Rebol [
Title: "Widgets Database Schema"
Type: 'roughcut
]

tax: 1.1 ; tax multiplier

record: make record [
after-tax?: does [tax * get 'cost]
]

%/controllers/widgets.r

Rebol [
Title: "Widgets Controller"
Type: 'controller
Default: "list"
]

action "list" does [
list: copy widgets
]

%/views/widgets/list.rsp

<html>
<head>Our Widgets</head>
<body>
<h1>Widgets:</h1>
<table><% foreach widget list [ %>
<tr>
<td><%= widget/get 'name %></td>
<td><%= widget/get 'price %></td>
<td>(with tax <%= widget/after-tax? %>)</td>
</tr>
<% ] %></table>
</body>
</html>

License

The main QM script is licensed under Creative Commons Attribution/Share-Alike License.

Components contained on this site may contain their own license as per their Rebol header.  If not, feel free to use, alter, share, or not.