Re: [SMARTY] To who's right is right??
| From: | Monte Ohrt | Date: | Mon, 17 Jun 2002 18:49:08 +0000 |
| Subject: | Re: [SMARTY] To who's right is right?? | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4907@lists.php.net to get a copy of this message | ||
I forgot the vice versa :) The programmer should _not_ have to touch template files to make changes to the application logic. The only exception is if the content being sent to the template changes, then maybe some template logic needs removed or skeletal structures added.
Bertrand DUNOGIER wrote:
MO> Rule of thumb: display/formatting logic goes in the template, all MO> other logic goes in your application. So in PHP do your db query MO> and assign the content to template, then format it there. If the MO> data is repetitive, loop through your data in the template to MO> display it in a table, etc. Absolutely. MO> The template editor should _not_ have to go into the PHP MO> application to make a change to the display of the content. I agree. On the application i worked on the two last month, there was a HUGE backend code, with massive database manipulation and all the stuff. Our webdesigner, who have only correct knowledge of control structures and loops, was able to achieve all his work by looking at the Debugging console and calling me 2 or 3 times. In my opinion, this is what you should end up with. Bertrand-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.