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


Well, to answer your question, I would like to write this site/set of perl scripts to be able to handle almost any amount of data it's given, maybe not quite like a corporate scale type thing, but something with say, 100+ users, a couple thousand messages, and many many many images and a lot of text.

I'd like to be able to use a module to use functions like update(), insert(), delete(), selectFrom(), etc, so I'd like to be able to display AND edit database data.

Mainly, I want a class that will pretty much handle all my database needs for me. A class that will be able to be accessed from the appropriate modules, such as a page module that would get the data from the database, and format it just so, along with a message script that would take the form data and insert it into the database as a new message, or a reply, or a user script that would update user info, or an admin script to delete, remove, edit, etc. messages and users.

Is that slighly more clear? I'm sorry for it being so vague, I was just trying to keep it general and open.

Thanks very much for all the help, just let me know what you need to know to help me.
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

Replies are listed 'Best First'.
Re: Re: Re: Best method for dynamic page generation?
by chanio (Priest) on Jan 04, 2004 at 04:05 UTC
    By the way that you are generalizing your needs, it sounds like the module that I am studying: CGI::Application that combined with HTML::Template , would be able to do a lot in one single (and hidden) module.

    The interesting thing of all this is that it is easy to follow an interactive dialog with every user and returning what is required in every case. The cgi script is very simple, and it only creates an instance of your CGI::Application module. I am planning to use it with a Session module. As if it were a commercial transaction. Just to learn!


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