Re: [Phplib-users] [Fwd: [phplib] general template question]
Brought to you by:
nhruby,
richardarcher
From: Richard A. <rh...@ju...> - 2001-08-14 07:15:51
|
At 11:52 PM -0700 13/8/01, Philip Strnad wrote: >> supposed to be, but I have one question: does anyone use Template for >> dynamic pages or do most of you use it to "write" HTML files that are >> then served statically? Template's real strength is in simplifying the handling of dynamic pages. it allows you to write PHP code that contains no HTML -- it's all in the template files. Of course with *really* complex pages it can be a lot of work to get *all* HTML out of the code, and you'll have to decide when to stop based on a cost/benefit analysis. The best thing though is that when the boss decides to redesign the site all you have to do is re-jig your template files. In theory! >> Is there a performance impact in opening a >> template file everytime a page that uses the Template class is >> requested? I think you'll find the overhead from templates is a lot lower than the overhead from other aspects of your dynamic pages. For example, a call to preg_replace is much cheaper than the cost of bringing up a database connection. Only way to tell for sure is to try it and see :) If you do run some performance figures, be sure to post them back to the list... that always generates a lot of interest. ...R. |