Re: [SMARTY-DEV] feature request

From: Date: Sun, 04 Jan 2004 17:53:57 +0000
Subject: Re: [SMARTY-DEV] feature request
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2020@lists.php.net to get a copy of this message
On Sunday, January 04, 2004 6:41 PM +0200, Peter Billen wrote: [snip] > Besides this, I don't know if this is a good method of programming: a > template may ask, for example, 'topic_name' and I detect that > variable isn't set yet => I get it from the database. But after this, > the template asks for 'topic_text' and I detect again that variable > isn't set yet => I get it from the database. But now I have 2 queries > (for 'topic_name' and 'topic_text') which could be combined into one > query => overhead because in this situation 2 queries will take more > time than 1 query. That's it... this isn't a good method of programming. The template mustn't control what is assigned to itself, and accessing the database from within the template on-demand is _really_ bad style. I'm sorry, but your proposal doesn't comply with the idea of separation of presentation and application logic ;-) David

« previous php.smarty.dev (#2020) next »