Hi Edward,
Michael Peters has already given you a great answer that what you are
planning will work quite easily with CGI::Application. It will still
allow for a lot of code reuse, and if using mod_perl, you can still
benefit from DB handle caching and other benefits of mod_perl.
The only limitation that you are going to suffer from is the ability
for one SSI call to comunicate with another. You will solely have to
base this on the Query parameters (ie the results of one SSI call
probably can't affect the results of a SSI second call on the same
page).
As for URL construction that is completely flexible in
CGI::Application (in other words, it is left up to the developer to
work it out). I use a slightly customized version of the URL plugin
in Template Toolkit to generate URLs, and I use the
CGI::Application::Dispatch module to embed my runmode in the PATH_INFO
of the URL. URL generation is as simple as this:
[% url( module='booking' rm='create' event_id=event.id ) %]
Which if the page was loaded with
http://myserver.com:80/app/events/list
Would generate the url
http://myserver.com:80/app/booking/create?event_id=324
'rm' and 'module' are optional and are treated in a special way to
generate the PATH_INFO. All other parameters are combined into the
query string. in the above call, event.id is a Class::DBI object.
Cheers,
Cees
On Tue, 22 Feb 2005 12:11:46 -0500, Halley, Edward D.
<suppressed> wrote:
>
> I've just started digging into CGI::Application and thinking about how
> to architect a small project of my own. Sorry if this is too basic,
> but Google didn't help me and this thread may help others.
>
> One question came to mind: I generally prefer to use one or two main
> .shtml files to give a site a basic layout, include all the style
> features. I then use Server Side Includes (SSI) to call on CGI scripts
> to build up portions of the page's content. I don't like making CGI
> scripts that output entire HTML pages. Also, though I know it's mostly
> irrational, I also don't like the ".cgi" appearing in a URL that people
> may end up cut-and-pasting to make links. At most, "http://foo/?bar=4"
> should clue the application if a parameter must be included in the URL.
>
> How compatible are these approaches? Can I make my CGI::App "run modes"
> implement only certain panes of an overall SHTML layout? If the pane
> wanted to provide a link to forward users to some other run mode, can I
> easily control the URL construction?
>
> [ e d h a l l e y ]----------------------------------------------------
>
> ---------------------------------------------------------------------
> 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
>
>
--
Cees Hek
---------------------------------------------------------------------
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.