in reply to Re: Re: Re: Best method for dynamic page generation?
in thread Best method for dynamic page generation?


INCREDIBLY, I just got Class::DBI to work :-)
I'm not exactly liking the idea of changing my templates to XML, but I think it would be a *great* idea to have a module/script that takes ALL database information and catalogues it into XML format, so when the user using my message board app (the idea is to create a message board for myself, and distribute the code), they can transfer the messages EASILY to any other languages or versions of the board. I like that.

On CGI::Application, before I go and research it, what kind of differences does it have and what kind of benefits does it have over CGI.pm? Faster? More suited for "production scale" projects?

Thanks so much to all who have helped thus far :-)

dhoss
"and I wonder, when I sing along with you if everything could ever feel this real forever? if anything could ever be this good again? the only thing I'll ever ask of you, you've gotta promise not to stop when I say 'when'", she sang
  • Comment on Re: Re: Re: Re: Best method for dynamic page generation?

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Best method for dynamic page generation?
by geektron (Curate) on Jan 04, 2004 at 05:42 UTC
    i just started using CGI::Application this week, so my opinion may not be totally informed.

    it's sort-of a subclass of CGI. it provides you a way to *organize* your run-modes ( actions ) in your application with a defined set of parameters and matching subroutines. something like:

    "foo_action" => \&foo(), "bar_action" => \&bar()
    and later in your module:
    sub foo { my $self = shift; # do stuff }
    it's something i used to do by hand. CGI::Application organizes it a bit more, and makes it a touch easier to come back to and debug, esp. if you're not the original coder.

      Oh, BRILLIANCE.

      Does it allow you to take query parameters to match your subroutines?

      "and I wonder, when I sing along with you if everything could ever feel this real forever? if anything could ever be this good again? the only thing I'll ever ask of you, you've gotta promise not to stop when I say 'when'", she sang
        here's part of a setup method ( i'm working on the project right now ) :
        sub setup { my $self = shift; $self->{TEMPLATEDIR} = "/home/templates"; $self->start_mode('edit_setup'); $self->mode_param('rm'); $self->run_modes( 'setup' => \&setup_list, 'edit_setup' => \&setup_edit, 'view_listing' => \&view_listing, }
        the start_mode determines what the first value of your run_mode will be.

        subs are then executed by URLs like:  index.cgi?rm=view_listing

        now go read the  perldoc on it. ;-)