waxmop has asked for the wisdom of the Perl Monks concerning the following question:
Normally, I would write some CGI / perl-mason scripts like this:
view_contact.cgi?id=34&showdata=all
or:
list_matching_contacts.cgi?matchfield=state&matchvalue=OH
Those programs would open the database, query, and the return the results formatted as html. Simple stuff.
Since I expect that users will be viewing data (read-only) much more often than editing data, I am considering instead writing a build_html() script that will go through the list of every contact in the database and write a few different static .html files for that contact. I will call this script after anyone uses any of the edit.cgi scripts.
The advantage is that I will avoid lots and lots of redundant database calls. The disadvantage is that I will have a directory with about 5 - 10 thousand html files. According to df -i, the partition I'll be working on has about 3 million inodes available, so I don't think I'll be doing much damage there, but I wanted to get the wisdom of the monks before I begin.
Is there a third way? All comments are welcomed.
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: web-app design question
by merlyn (Sage) on Jan 08, 2004 at 17:05 UTC | |
by waxmop (Beadle) on Jan 08, 2004 at 19:13 UTC | |
Re: web-app design question
by duff (Parson) on Jan 08, 2004 at 16:11 UTC | |
Re: web-app design question
by waswas-fng (Curate) on Jan 08, 2004 at 15:57 UTC | |
Re: web-app design question
by arden (Curate) on Jan 08, 2004 at 16:14 UTC | |
Re: web-app design question
by borisz (Canon) on Jan 08, 2004 at 15:42 UTC |