Code splitting in Wapp application
(1) By Vetelko (vetelko) on 2025-01-10 17:10:42 [link] [source]
Guys, I wanted to ask if you split the code in your Wapp application into multiple files, similar to how it's done in PHP (include/require). If yes, what method do you recommend? Simply "source" command?
V.
(2) By D. Richard Hipp (drh) on 2025-01-12 19:54:14 in reply to 1 [source]
I've never done that. But using "source" seems like the obvious choice.
To minimize startup time, you would do well to only "source" file particular files you actually need for that request, rather than source-ing them all, I suspect. But that is just an optimization.
(3) By Olaf Ritter von Ruppert (oruppert) on 2025-02-06 09:25:56 in reply to 1 [link] [source]
I concatenate my tcl source files using a Makefile. It includes an install task that copies the resulting script into the apache cgi folder. During devlopment inotifywait triggers building, testing and installing when I save a file. I'm new to tcl and I do not use packages for my small programs. Hope that helps.
Greetings, Olaf