RE: [SMARTY-DEV] feature request

From: Date: Sun, 04 Jan 2004 18:17:25 +0000
Subject: RE: [SMARTY-DEV] feature request
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2021@lists.php.net to get a copy of this message
That's what I was afraid of :) So your proposal is to assign everything to the template, even if some of the variables (which may be big arrays) may not be called within the template? But anyway, I think such function may be a nice feature, for logging purposes for example? Thanks for your support, Peter -----Original Message----- From: Wom.bat [mailto:wom.bat@gmx.net] Sent: zondag 4 januari 2004 18:54 To: Peter Billen Cc: smarty-dev@lists.php.net Subject: Re: [SMARTY-DEV] feature request 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 (#2021) next »