Updated 2012-10-15 11:03:20 by dkf

10/22/2003 Stefan Vogel

I just wanted to get familar with metakits. So I build up a very simply but still useful (at least for me) Webadministration-Interface for Metakit.

This webadministration [email protected] works with Tclhttpd.

With [email protected] (Version 0.5) you can:

  • create metakit-database-files
  • create, modify, delete views
  • create, edit, delete rows
  • view binaries
  • test queries ...

Installation is quite simple (as always with Tclhttpd):

  • Download the script "mkweb_05.tcl" from http://www.vogel-nest.de (Go to "Technical > [email protected]")
  • Copy the script "mkweb_05.tcl" to your tclhttpd-custom-directory (may be you have to patch your Tclhttpd so that custom-files are read: http://sourceforge.net/tracker/index.php?func=detail&aid=635083&group_id=12884&atid=112884 )
  • Create a directory where you place your metakits (let's say: /metakits or c:/metakits)
  • Adapt the directory in mkweb_05.tcl (e.g. set the array aConfig(databaseDir) to /metakits or c:/metakits)
  • restart Tclhttpd
  • Go to http://<yourdomain>/mkweb

Or you simply can run it with tclhttpd.kit (thanks to jcw for that info). Download tclhttpd.kit from http://tcl.tk/starkits .
 mkdir htdocs
 mv mkweb.tcl htdocs
 date >htdocs/index.html         # just to have an index file
 cp tclhttpd.kit >htdocs/try.mk  # just to have a sample datafile
 tclkit tclhttpd.kit -docRoot `pwd`/htdocs -library `pwd`/htdocs


This Webadmin-interface was developed only for me and my local installation of Tclhttpd.

  • Currently there is no security implemented! Everyone who can access your webserver can access your metakits!!
  • Only one user at a time should access [email protected] because the configuration-values are globally set (no sessions). Maybe someone wants to make this script session-aware?
  • Be sure that no spider follows the links on the page (the delete-operation is available as a link, so be careful).

Next steps/Missing features:

  • make it session-aware

You've been warned. But now ... have fun:

... Script removed ...

10/23/2003 Stefan Vogel O.k. even though the complete Webadministration of Metakits was only about 600 LoC, it's a little bit to much for the Wiki. You can download the script "mkweb.tcl" from:

http://www.vogel-nest.de (Go to "Technical > [email protected]" )

Wow! -jcw

[http://mini.net/pub/mkweb.png] - is a screenshot of version 0.4 showing a subview (not embedded).

And this is an actual one (although the Mac-Screendump looks a lot nicer!!!):

rmax - This looks very nice indeed!

But I keep getting the following error whenever I invoke a link, that changes anything (creating/deleting databases, modifying views, adding rows, etc.):

[Stack trace and further discussion deleted - because error is fixed]

This is a terrific tool. Thank you! I've found a problem with the script that causes the textareas for editing a row to be rendered incorrectly (at least in Mozilla), it's line 609 which should be changed from this:

[Error-description deleted because it is fixed]


10/29/2003 Version 0.4 released

I've updated the screendump for OS X as well -jcw

11/4/2003 Version 0.5 released (only minor bug-fixes)

WJR It would be nice to have a button or link that will close the database connection that's currently open.

The connection should be opened and closed for each HTTP-Request, so you should be able to open the same database inbetween requests. Perhaps I forgot to close the database sometimes? Stefan Vogel

WJR Here's some more info that may help: I have a Metakit session database for a small web app I'm prototyping. I find that when I'm using Webadmin with the session database open, and I'm using my prototype, the prototype will return a '{db} is already open' error. I've looked at my code, and it seems that all my DB connections are being closed properly.

It should be possible to debug this using "mk::file open", which returns a list of open db's -jcw

02/06/2004 Stefan Vogel I just released Version 0.6 which now supports sessions. Have a look at http://www.vogel-nest.de (Go to "Technical > [email protected]") for more information and for downloads.

15apr2004 jcw - FWIW, I've wrapped up a slightly tweaked copy of [email protected] 0.6 + tclhttpd 3.3 into a single starkit, at [1]. When launched for the first time, it'll explain how to set it up. Be aware that the setup is not secure (anyone can browse and edit the data), but it works fine for development.

6mai2004 Stefan Vogel - Thanks Jean-Claude nice work. Just want to remark that mkatweb.kit has to be started with tclkitsh from inside a "cmd"-console (at least on windows) so that the initial explanation is printed.