Changes to Tcl Web Application Framework between r4 and r21

'''Framework for Simplifying Writing and Supporting Web Applications in [Tcl]'''

   * Documentation: http://www.rkeene.org/projects/webapp/webapp.pdf
   * Source: http://www.rkeene.org/devel/webapp-0.3.5.tar.gz -->    * Source: http://www.rkeene.org/devel/webapp-0.3.32.tar.gz
(blank line)
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.
(blank line)
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.
(blank line)
Feedback and suggestions are appreciated as this project matures.
----
'''Using it with [RivetCGI]'''
(blank line)
The Tcl Web Application Framework requires a [Rivet] implementation.  Unfortunately "[http://tcl.apache.org/rivet/ | 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.
(blank line)
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).
(blank line)
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.
(blank line)
''How does it work ?''
(blank line)
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
(blank line)
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.
(blank line)
''Walk me through it!''
(blank line)
   1. Create an "archive" directory for tarballs
   11. `$ mkdir archive`
   11. `$ cd archive/`
   2. Download the latest Tcl Web Application Framework tarball [http://www.rkeene.org/devel/webapp/] into the archive directory
   22. `$ wget http://www.rkeene.org/devel/webapp/webapp-0.3.32.tar.gz`
   3. Download the latest RivetCGI tarball [http://rkeene.org/devel/rivetcgi/]
   33. `$ wget http://www.rkeene.org/devel/rivetcgi/rivetcgi-0.5.0.3063.tar.gz`
   4. Download Tclkits
   44. For your platform:
   444. `$ wget -O tclkit http://www.rkeene.org/devel/kitcreator/kitbuild/0.6.1/tclkit-8.5.10-linux-i686`
   444. `$ chmod +x tclkit`
   44. (Optional) For your run-time platforms:
   444. `$ wget -O tclkit-win32 http://www.rkeene.org/devel/kitcreator/kitbuild/nightly/tclkit-cvs_HEAD-win32-i586-notk-xcompile`
   5. Extract the archives
   55. `$ tar -xf webapp-0.3.32.tar.gz`
   55. `$ tar -xf rivetcgi-0.5.0.3063.tar.gz`
   6. Configure the Tcl Web Application Framework
   66. `$ cd webapp-0.3.32`
   66. `$ ../tclkit setup.tcl`
   66. `Type of DB (mysql, mk4, sqlite): '''mk4'''`
   66. `Please enter a username: '''root'''`
   66. `Please enter a password: '''secret'''`
   66. `DB Filename: '''database.mk'''`
   66. `Database relative to index.rvt (Normal) or executable (Starkit) (y/N): '''y'''`
   66. ` *** SECURITY WARNING ***`
   66. `Please ensure that the database file ("''database.mk''") is not`
   66. `accessible via HTTP (this usually does not affect RivetCGI).`
   66. ` *** SECURITY WARNING ***`
   66. `root = ''b-49e71a67-7124c024-4e02d0726376861869c0''`
   66. `anonymous = ''b-17939e23-7124d033-4e02d0725c7317ec69c0''`
   66. `$ mv database.mk ../../`
   66. `$ cd ../`
   7. Create your application
   77. `$ cd ../`
   77. `$ mkdir myapp`
   77. ''... more to come...''
   8. Convert your application and the Tcl Web Application framework into a Starkit
   88. `$ archive/rivetcgi-0.5.0.3063/bin/rivet2starkit "$(pwd)/archive/tclkit" myapp.kit archive/webapp-0.3.32 myapp:local`
   9. Test it out:
   99. `$ archive/tclkit myapp.kit --server --port 8080 --foreground yes --accesslog - --errorlog -`
   99. Visit: http://localhost:8080/ in your web browser
   0. (Optional) Convert to a standalone executable:
   00. Download "sdx.kit"
   000. `$ cd archive/`
   000. `$ wget http://equi4.com/pub/sk/sdx.kit`
   000. `$ cd ../`
   00. Use "sdx.kit" to convert the [Starkit] "myapp.kit" into a [Starpack]
   000. `$ archive/tclkit archive/sdx.kit unwrap myapp.kit`
   000. `$ archive/tclkit archive/sdx.kit wrap myapp.exe -runtime archive/tclkit-win32`
   00. Test it out:
   000. `$ wine ./myapp.exe --server --port 8080 --foreground yes --errorlog - --accesslog - --maxthreads 0`

Legend

     Only in r4
     Only in r21
     -->      Modified slightly between r4 and r21