|
Posted by Snef on 10/16/06 21:13
pittendrigh wrote:
> There must be millions of dynamically generated
> html pages out there now, built by on-the-fly php code
> (and jsp, perl cgi, asp, etc).
>
> Programatic page generation is transparently useful.
> But querying a database, negotiatinig lots of if-then-else logic
> and echo'ing html code out on port 80 every time a
> page is requested has to be a huge waste of resources.
>
> Why not use that logic to print static html instead of dynamic?
> The few pages that need to be dynamic (perhaps the results of a
> database
> query) probably represent only a small fraction of the total
> number of pages that are rendered by on the fly code.
>
> Seems to make sense to me. All you need to do is work
> the output directories into your code logic somehow,
> and do a few one-time-only mkdirs before printing out the static html.
>
> Am I missing something?
> Why is it so little open source page generation software acually
> works that way?
>
Hi,
I made a CMS that will create some 'static' html files on the server. When the
page changes, the page is generated again and written to the server again. This
way I save a lot of db queries and resources.
When the page needs something dynamic (like scheduled newsitems) it is fetched
through AJAX or (users choice) a 'more-dynamic' page (php and in the future also
in Perl or ASP) is generated.
The reason I choose this method had to do with the fact that the user of the CMS
should be able to easily link to a generated page. For most of the people it is
easier to search for somthing linke http://mydomain.com/aboutus.htm than
http://mydomain.com/index.php?page=aboutus or something similiar.
It works for my project...
Snef
[Back to original message]
|