You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by James G Smith <JG...@TAMU.Edu> on 2001/06/11 19:58:05 UTC

Re: Questions Concerning Large Web-Site

"Purcell, Scott" <sp...@ltcgroup.com> wrote:
>I was hoping to hear some simple input from people who have
architected good, sound sites, and was hoping for some good feedback, or
>some old sample code that I can study and find out how the other half live.

Well, I can give some things I've tried to live by.

(1) Keep each component simple - it's a lot easier to debug.

(2) Never depend on hidden variables telling you which page you are on -- look 
at the data and see which page the data fits best.  This increases security.  
I typically make one script per task and let the script figure out which page 
to show.  Cf. TWIG, which has a single controlling script (index.php3).

(3) Build a solid foundation - makes the user interface almost trivial and 
easier to manage when policies change.  This usually consists of a set of 
libraries to do the actual work.

(4) If it's on CPAN, try to use it.  Better to use someone else's work (if it 
fits) then reinvent the wheel.  You might want to check out some of the 
templating packages available.  If you want a framework, take a look at Mason.

(5) Even for a single developer, revision control can be nice.

These (except the CPAN part) are based on my experience with a PHP project 
that I am working on (yes, different language but same rules) which consists 
of around 50,000 lines of code, unfinished (email and directory service 
management for customers based on TWIG).

John's email has some good suggestions specific to Perl.
-- 
James Smith <JG...@TAMU.Edu>, 979-862-3725
Texas A&M CIS Operating Systems Group, Unix