Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Creating new HTML files and accessing them later.

by thatguy (Parson)
on Aug 11, 2001 at 04:03 UTC ( #104093=note: print w/replies, xml ) Need Help??

in reply to Creating new HTML files and accessing them later.

I've written something similar to what you are suggesting for my own site (linked from my homenode).

I used flatfiles for the first version and I am currently in the process of switching over to a mySQL setup. If at all possibile, I would suggest using a database of some kind. This would allow you so much more flexability down the road and perhaps some performance boosts too but that depends on the traffic really.

With either a database or a flatfile arrangement, a single perl script that handles the html (much like the here) would make changes to the look of the site and maintance *much* easier and quicker.

As for new sections, in a sql enviroment you could have a column that states the type of page like comment, story, userid etc and dump data into that. If you use flatfiles, then I would just put the data (the meat, not the whole page) in a file in a directory that only new stories go in or use a proprietary extention.

you really should look at HTML::Template and CGI. HTML::Template would make it easier for a non-perl person to maintain the html and CGI just makes CGI easy. there is a HTML::Template tutorial here and Lincoln Stein's tutorials here.

The most important thing to do is to plan out where things are going to be and how they will look to the user and stick with that. I made it an everchanging process as I went and it took forever because the changes I made meant a re-write of the code.

Good luck and feel free to msg me if you like.

  • Comment on Re: Creating new HTML files and accessing them later.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://104093]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2020-05-29 12:18 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (169 votes). Check out past polls.