[How to architect Rivet applications] Anton Osennikov wrote:
> I use the following approach. I think this shows that Rivet is pretty flexible - you can use it many ways:-) > Uri structure is: http://site.domain/path/web.tcl/document?parameters > > web.tcl is a main script for application. It does the following: > > - checks if library scripts are changed > - deletes slave interpreter if needed > - creates new slave interpreter if needed > - loads library scripts into it > - gets "document" part of uri and uses it as name of library procedure > - runs this procedure to generate document requested > > Every page in my application is generatated by some tcl procedure. Names > of document generation procedures are held in tcl array. > > I don't use ".rvt" files. I use "htmlgen" package for html generation. > If ".rvt" is needed, one may create tcl procedure to parse it. Or you could use the built in 'parse' command. > Slave interpreter is needed to run several applications inside single > apache server without interference. Uri element "path" distiguishes > between applications. Also, deleting slave allows to restart application > without restarting apache. Cool idea! This approach is very interesting, and is more "application oriented" as opposed to something quick involving .rvt pages. Personally, I take a different strategy depending on what I've got to do. For something quick and dirty, I just use .rvt pages. For more complex, application style projects, I tend to use .tcl files that then use 'parse' to parse up a template depending on whatever action is called for. It would certainly be neat to write up a couple of these approaches for the web site to give people an idea of the different ways Rivet is used. -- David N. Welton - http://www.dedasys.com/davidw/ Apache, Linux, Tcl Consulting - http://www.dedasys.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
