http://qs321.pair.com?node_id=77783

I'm currently developing a site in Perl for an anime club I belong to. The site needs several areas that are updated rather frequently (member listing, showing schedule, anime news, club news, links, etc). I'm developing this site in Perl so several club members who don't have design and programming experience can maintain the content of the page by entering information into forms that update the content. Currently I have it set up so a user calls my Perl file and it loads the page, and switches between pages by using the QUERY_STRING.

The question that has been bothering me is this the best way to deliver content to the users? I can easily change the Perl file to output new HTML pages upon updates, rather than having the users access the Perl file all of the time. We currently don't have any plans for a portal type system, and the only thing that I could foresee being forced to have users access the Perl file would be a forum.

I'd like to hear what other people have done in similar situations, is there some other implementation that I've overlooked?

Arashi

I'm sure Edison turned himself a lot of colors before he invented the lightbulb. - H.S.

Replies are listed 'Best First'.
Re: The best way to deliver content
by Masem (Monsignor) on May 04, 2001 at 01:39 UTC
    You need to ask several questions: How often will pages update? How fast is your hardware? How many hits will your pages get in relation to that hardward.

    If updated frequently and Hardware is sufficient for hits, then you should generate the pages dynamically when the user requests them. This is the most common way to do things.

    If updated frequently and Hardware is insufficient for hits, I would deliever the pages statically, and have a cron script go along every hour or 1/2 hr or whatever you thing a good frequency is and update all pages. Static page delievery is much easier to handle than dynamic, and the infrequent updates should not slow the server down.

    If updated infrequently and Hardware is sufficient for hits, this is the overkill situation :-), you can opt for a dynamic or static system. But if you think your system will grow, you may want to do it statically.

    If updated infrequently and Hardware is insufficient for hits, have the approprate static page update after it is modified by your editor, and delieve the static pages.

    Of course, the specific situation may differ as you go along, or for certain areas of the site. You need to judge how everything works and assertain your site performance to see if you need to favor static over dyanimic pages.


    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
Re: The best way to deliver content
by Sherlock (Deacon) on May 04, 2001 at 01:47 UTC
    If you're currently printing the HTML directly from the Perl file, you might want to think about using HTML::Template. There are some pretty good tutorials in these nodes: Using HTML::Template & HTML::Template Tutorial.

    HTML::Template offers the ability to split the HTML and your Perl code into separate files. If you're currently serving up multiple pages from a single Perl file, it's probably cluttered with HTML. You could remove each of these pages into template files and then, if someone without the knowledge of Perl comes along but they'd like to edit the HTML, they can do so without having to worry about the Perl.

    If you keep the HTML within the Perl file, you'll need someone with knowledge of Perl to make any changes with the page. Since it sounds like you're the only one that knows Perl, that person would be you. Why give yourself the extra work? using HTML::Template will give others the ability to do those changes.

    Hopefully, this will help you out.

    - Sherlock

    Skepticism is the source of knowledge as much as knowledge is the source of skepticism.