in reply to Best method for dynamic page generation?

I have to agree with various people who have said that this question is incredibly vague.

You want an interface to the database. How much of the complexity of the database do you want your interface to give you access to? Do you want to be able to manipulate data in the database, or just display some of it? Do you wish to integrate this tool with the schema of the database? Do you wish to integrate constraints in some efficient way? And how should it scale? To updating 10's of millions of rows of data at once? To hundreds of simultaneous users? (That tends to conflict with manipulating lots of data at once.)

Until you nail down some of these significant details, it is hard for me to understand what you want to do. What you are describing could mean anything from Microsoft Access down to a module for displaying query result sets. I don't think that any one solution can effectively address all of the possible desires (certainly if I could dream of that solution, then I'd expect it to exist already).

Perhaps a better place to start is to think through some "use cases". Imagine that you had your module. How do you envision using it and what would the result be? Envision the usage in enough detail and you have a pretty good idea what the API should be. Envision what the result is in enough detail and how to start writing it will start falling into place. (Or, more likely, you will be able to recognize what you are looking for as being something that is already on CPAN.)

  • Comment on Re: Best method for dynamic page generation?

Replies are listed 'Best First'.
Re: Re: Best method for dynamic page generation?
by stonecolddevin (Parson) on Jan 04, 2004 at 01:07 UTC

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