Website directory structure question

liunx

Guest
I'm going to be apart of a four person team at my high school that will be building our schools website. We are going to use cgi/perl for most of the website. My question is: Should we just create all web pages from inside a cgi/perl file or create html files that will work with cgi files? However, by creating HTML files, I cannot use variables for the site and I have to use SSI instead of just doing that in cgi. Also, if I decide to write all pages from cgi, would you recommend using one file? How do I create a file with variables, subs, etc. that will be accessed by another file? This web site will consist of a complex calendar, homework online, conference sign up, polls, message boards, announcements, etc. It will be a very complex web site. I have made sites in the past from one cgi file, but it came out to be over 120 Kb and in order to go to one page, I think that my computer executed the entire file, which slowed it down.<br />
<br />
Thank you every much!<!--content-->I don't know a thing about CGI/Perl, but I have some basic knowledge of PHP so I'll compare it with that.<br />
Anyway: dumping an entire site into one file seems like the worst idea ever! Submitting your users to a 120kB Download <!--more--> is intolerable, and I think you guys will go nutty pretty soon just by trying to maintain such a monster.<br />
<br />
Although sometimes it makes perfect sense to have a script generate more then one version of a page in a dialog kind of application and moving aroud variables seems much easier that way, I would certainly recommend keeping that practice to an acceptable level and placing unrelated sections of the site in separate documents.<!--content-->About all you can say good about throwing everything into a 120K Perl file is that you know which file has all the bugs. If you want to use Perl then design HTML "template" pages with custom tags and variables in them that can be processed through CGI to customize each page as it's sent to the browser. Oh, wait, that's PHP. Do yourself a big favor and build this thing in PHP to start with. It's like Perl for the web and the learning curve isn't too steep. Better yet, find someone who has already done most of it in PHP for you.<!--content-->
 
Back
Top