Tcl Web Application Framework r12 (See the current copy)

Framework for Simplifying Writing and Supporting Web Applications in Tcl

The Tcl Web Application Framework helps simplify writing Web applications in the Tool Command Language (Tcl). It provides the features that form the basis for writing an application, such as sessions, users, privilege separation, and an abstract database interface. It is currently under development, but stable for production use.

It is written in such a way that applications can integrate into the framework without having to modify the framework itself, making upgrading the framework without breaking the application possible.

Feedback and suggestions are appreciated as this project matures.


Using it with RivetCGI

The Tcl Web Application Framework requires a Rivet implementation. Unfortunately "mod_rivet" only works on Apache (and for a long time only worked on Apache 1.x) and does not change user IDs (as with "suexec" and "su_php") from the web server user ID.

To address this I've implemented a stand-alone Rivet implementation called RivetCGI. RivetCGI supports being run as a CGI under any existing HTTP server, or converting a directory tree into a Starkit (single file Tcl script that represents an archive of files and directories as a virtual filesystem within Tcl) and acting as a standalone server (or standalone CGI on any web server).

This last option is especially useful when used with the Tcl Web Application Framework, since you can create a single executable that represents your application and is a standalone web server.

How does it work ?

There are several pieces that need to fit together to make your application work:

  1. The Tcl Web Application Framework;
  2. RivetCGI;
  3. A Tclkit for the platform that you are building the Starkit on; and
  4. Optionally, a Tclkit for the platform that you wish to create a standalone executable for that does not require Tcl

Once you have all these pieces, you can use "bin/rivet2starkit" from RivetCGI with the arguments of the Tclkit, your kit-to-be-created, and the path to the Tcl Web Application Framework. After that, if you desire, you can convert the Starkit into a [Starpack] for any platform.

Walk me through it!