Re: [SMARTY] How far to go with smarty templating?
| From: | steve | Date: | Sun, 23 Jun 2002 19:53:58 +0000 |
| Subject: | Re: [SMARTY] How far to go with smarty templating? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4981@lists.php.net to get a copy of this message | ||
I go out of my way to not have a single html element in my php scripts. This
is not a religious decision. It is because I am passing my templates data.
That is all I use the php scripts for. The template then does all of my
presentation. So far, sounds like I haven't said much right? Well.. my
customers suffer from severe fits of feature/scope creap. When the data is
available raw in the template, I don't have to touch my tested and working
php code to give them an additional "feature" or modification that doesn't
involve different data. In the end, I have templates that are a little
complex - but nothing that good comments and coding style can't make up for.
This data only approach also proves very handy when you want to be able to re-
use the logic/data code somewhere else. HTH
---------- Original Message -----------
From: "Avern Williams" <avern@hotmail.com>
To: smarty-general@lists.php.net
Sent: Sun, 23 Jun 2002 09:22:37 +0000
Subject: [SMARTY] How far to go with smarty templating?
> Hi,
>
> This may be more of a philosophical smarty question, but here goes.
> I have an existing php application that does a database query,
> formats the results, and then displays the formatted results within
> a webpage. To integrate this app with smarty, does it make more
> sense for me to:
>
> A) have the existing app do the query and format the query results.
> Then have smarty display those results in a web page
>
> OR
>
> B) have the existing app only do the database the query, then have
> smarty both format the query results and display the entire web page
>
> Again, I'm new to smarty, but I'd appreciate your opinions on
> whether one method has advantages over the other.
>
> thanks,
> Avern
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp.
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
------- End of Original Message -------