Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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 index.pl 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.
-p


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2014-07-30 09:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (230 votes), past polls