Halley, Edward D. wrote:
Thanks for the tips-- I'll look at Template Toolkit but I'm not particularly fond of templates; it feels like the tail wagging the dog.
Really? I'm *so* glad that there are good templating solutions out there. Separating the content from the code is a godsend. Being able to edit a template with an HTML editor or not having to mess around in my perl code for small (or even large) formatting changes is so nice. Maybe one day we'll help you see the light :)
Besides, don't you consider using an HTML page with SSI to be a template? If that's all you are doing, then it's pretty much HTML::Template with a different syntax.
I also noticed your post about using Class:DBI (which I assume is for the same project). Using the Model-View-Controller pattern with Class::DBI as the model, CGI::App as the controller, and TT or HTML::Template as the view really helps me to organize large projects and keep a good separation of concerns.
But this makes me fear the number of distinct database connections or the overall feasibility of having more than one .cgi?rm=mode script displayed on the same page. Maybe this is too aggressive a design for a first project with these modules, but I'm thinking of future growth.
This is really a downside of using SSI like that for multiple CGI's. If you are using vanilla cgi (not mod_perl) then your server will not only have to spawn a perl process for each request, but multiple perl processes per request and that can really slow things down. This is one of the reasons I suggested using a templating system. It would all be within one process. Even under mod_perl this system would be faster than SSI.
--
Michael Peters
Developer
Plus Three, LP
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.