Re: Pear HTML_Template vs Smarty
| From: | Alan Knowles | Date: | Wed, 08 Mar 2006 03:04:35 +0000 |
| Subject: | Re: Pear HTML_Template vs Smarty | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41706@lists.php.net to get a copy of this message | ||
Dan Rossi wrote:
I dont understand , what did u mean its trivial to add using bufferedOutputObject ? Thats returned the buffered string, as you said the application level should be able to handle the caching, ie using cache lite its advised from the examples to cache everything and only include the required classes on the non cached page. And then you have caching extensions which can be cached page per page wise, so personally I dont think a template engine should really have to handle the output caching or its just one extra included feature in there that may make it more bulky.the bufferedOutput is pretty small and just does ob_start/ob_.... etc. and can be used to get the output of the template. so it can be cached by the application: A typical example would be showing the list of categories on PEAR's web site. (where the first page does a SQL query to fetch data, and render to the screen) - the block of the template could be cached as HTML (although SQL output caching is probably more technically correct). where as the rest of the page may be more dynamic (including extra information if the user is logged in.)
However what is the compiler caching you talking about ?compiler caching is effectively the process of turning the template into a PHP script (which is what flexy and smarty both do). Regards Alan
On 07/03/2006, at 3:27 PM, Alan Knowles wrote:For flexy, It's pretty trivial to add using bufferedOutputObject(), what Flexy doesnt try and do is understand how you might need to cache that output... -> which is really very dependant on the application... ** caching here refers to output caching, not compile caching... (for those that wondered..) Regards Alan Dan Rossi wrote:On 07/03/2006, at 12:17 PM, Justin Patrin wrote:-- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpWhich can happen application level or server level anyway , but a cache feature would be handy in flexy but then again, extra code to be added into it.It should also be mentioned that some template engines (e.g. Smarty) will compile and cache templates as well.