Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

The best way to deliver content

by arashi (Priest)
on May 04, 2001 at 01:23 UTC ( #77783=perlmeditation: print w/replies, xml ) Need Help??

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?


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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://77783]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2023-03-20 16:56 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (59 votes). Check out past polls.