Fwd: [UPHPU] Template engines
Wayne Jensen
jensenw at gmail.com
Tue Oct 10 19:50:35 MDT 2006
bah, this was supposed to go to the list.
---------- Forwarded message ----------
From: Wayne Jensen <jensenw at gmail.com>
Date: Oct 10, 2006 7:47 PM
Subject: Re: [UPHPU] Template engines
To: Velda Christensen <velda at novapages.com>
On 10/10/06, Velda Christensen <velda at novapages.com> wrote:
> Smarty works great for me. Granted you will of course run into
> designers who won't use anything that doesn't have a wysiwyg, in which
> case you or someone like you will be doing the coding for them, but at
> least with smarty I can enable the pop-up debugging console and easily
> edit templates that way. I like the smarty-based systems where I can
> edit files online (and revert to the last save if I have to). I save my
> changes, refresh my other tab, and I can see exactly what I just did.
>
> Bottom line (and of course still putting engineering aside):
> - If you're going to do all the design-related coding FOR the designer,
> don't worry about templates.
> - If you're working WITH the designer to script, I'd say it's up to how
> you and your designer work together. The bigger / more random the group
> or the more.. polar shall we say.. the designer and programmer are, the
> better chance you ought to keep them separated.
> - If a designer is going to need to work extensively on their own (as in
> the case with a cart or cms) by all means, please use smarty or
> something like it.
>
> I, and a good number the designers I work with, are in the second or
> third scenario. I don't know how we'd get by without some sort of
> template system ;-)
>
> I have seen systems where the person actually imports some pages into
> their favorite WYSIWG, edits them, saves the resulting html, loads it
> back into the system, and the system automatically generates templates
> based on on the html. Alot of designers dig that too but it's probably
> too big a pain in the .. neck .. for most applications. So to me,
> smarty still takes the cake.
>
> Hoping that helps.
>
> -Velda
>
I'm still not seeing an advantage to using a separate templating
system like Smarty over using PHP as a templating language. Perhaps
I'm missing something? The designers don't have to learn to be
programmers and they don't have to learn very much about PHP, only a
few basic things, just enough to get things to display correctly. You
still keep the display logic separate from the rest of the logic.
P.S. I just remembered the other thing that drove me nuts about Smarty
when I was using it... the {literal}{/literal} was extremely buggy
when trying to make Smarty not parse Javascript and CSS. I don't know
if that's been fixed since then or not because that was a couple of
years ago. ...and sure, I know I should have just separated the CSS
and Javascript out into their own files, but... well... nevermind, I
don't have a good excuse.
More information about the UPHPU
mailing list