-- petersm <petersm@xxxxxxxxxx> wrote
(on Thursday, 22 January 2004, 10:27 PM -0500):
> Matthew Weier O'Phinney <matthew@xxxxxxxxxxxxxxxxx> wrote
> > I recall seeing some discussion either here or on perlmonks a couple
> > weeks ago about how to build a website that offers several applications
> > using CGI::App. However, I cannot remember the substance of what was
> > discussed, and I'm having trouble finding the thread anywhere.
> >
> > My question is this: I'm developing a site that will have a Wiki, an
> > articles database, a mail form, a photo gallery, and possibly other
> > applications. In the framework I was developing, I was creating some
> > functions that would generate sidebar content based on the user logged
> > in -- blocks of links, rss feeds, etc. These would be present
> > regardless of the particular application module used.
> >
> > Now, CGI::Application::Wiki, CGI::App::PhotoGallery, and
> > CGI::App::MailForm all already exist, and it seems natural that I would
> > use these. However, what would be a "best practices" method for making
> > sure each app shares session information and creates the sidebar blocks?
>
> I think you might be remembering the CheesePizza idea that we use. It
> consists of one CGI::App that runs any number of smaller CGI::Apps. It is
> ideal for having several little apps (Wiki, PhotoGallery, Mailform) that all
> share the same look and feel and if there are any other apps that will need
> to run continuously (DynamicNav, Poll, etc) on the page in the side bar, etc.
Thanks for telling me about your project. However, on looking through
the documentation, it's a bit more far-reaching than I'm needing. Apart
from the administrative backend and the wiki I'll be placing in there,
most of the site will be fairly static. CheesePizza, believe it or not,
looked like overkill.
I finally found the thread that started my thinking, and it was the
following node at Perl Monks:
http://www.perlmonks.org/index.pl?node_id=320946
In there, and following up on several nodes linked within, I finally
found some of the original ideas that got me thinking in the first
place... and which sent me right back to the CGI::App manpage.
In a nutshell, it looks like what I need is covered in the
cgiapp_init(), cgiapp_prerun(), and cgiapp_postrun() methods -- with
these, I can make a superclass that handles the various sidebar items
based on authentication (which it also handles); then my various
applications would simply use that superclass as their base.
My only question now is, has anybody done something like this and
utilized the existing CGI::Application::Wiki, CGI::App::MailForm, etc --
i.e., had them become subclasses of a developer-defined CGI::App
superclass? If so, how?
Thanks again!
--
Matthew Weier O'Phinney
http://weierophinney.net/matthew/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
|