[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] A runmode for every page ?


Hi,

I've been using an internal CGI framework for the past few yers. We do
smething like this to draw a screen that is not taking data from the
user :

foo.cgi?a=s&screen=dataEntryForm

Which means action = s [draw a screen] and the screen is probably
somewhere like templates/dataEntryForm.tpl

And if dataEntryForm has things in it that require getting data from
the database or what have you.. it can get all those things it self.
With special tags like <?
exec_func("main::drawSelectList($dbh,"countries")"); ?> etc... we load
in these templates, parse them up and spit them out.. we also have
some special tags so that any template may have access to query form
variables etc.. as well, templates can execute sql queries and draw
lists on their own.

Now, when I do the same things using CGI::App and consequently
HTML::Templates, I use a specific runmode for each and every page in
my application.. and i put HTML::Template variables inside the pages..
then of course i have to grab the data i need each time for each
runmode, assign them to template variables and draw teh template.

What I'm looking for is a method which i cause use 1 single runmode to
display any page in my system, [and let the pages more or less draw
them selves.] then other runmodes would only be used for doing
business logic, adding things to a database etc.. I thought of using
embedded perl with this.. but I'm not to sure if this is the right
solution..

Please let me know what you have done to make drawing screens easier.

-- 
Jeff MacDonald
http://www.halifaxbudolife.ca

---------------------------------------------------------------------
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.