On Aug 6, 2007, at 1:35 PM, Velda Christensen wrote:
Scott Hill wrote:
I have
never been able to justify the overhead of a template engine in
what I've
done so far.
My humble $.0s.
I can see skipping a separate template system if you work alone or
with a close knit team. Not everyone has that luxury though.
As a designer, I prefer using smarty or a template system like it,
even if it's a reinvented wheel, because of an experience I had
with a bit of a neurotic programmer who frequently made me his
scapegoat. Most programming errors, he made it clear, could have
been easily avoided by not giving a skirt access to the code, even
if she was just logging in to add css classes. Since I was
responsible for presentation and usability, had we used a separate
template system, I'd still be there, and they wouldn't be calling
me every year or so asking what it'd take to bring me back.
This sounds to me a like an access control issue, not a templating
system issue. If you're using your template system to manage who-can-
change what, I think there's a more fundamental issue at work. Were
you using a code-versioning system? Were you all working on the same
copy of the code?
I know that's one bad situation and there should be dozens of
better situations to make up for it. But the fact of the matter is,
you can't always choose your designers, and you just may be able to
avoid a little frustration for both parties by drawing a big line
between back end and design. That line gets a bit fuzzy if your
logic and presentation are done in the same code.
Smarty is not the only way to separate business logic from the
presentation layer. Again, I don't think that template systems are
even feasible as security measures. If you don't trust your designer,
then why are you working with them? I also don't see how Smarty
enforces the security you're even after.
Plus, as a web host, it's nice to be able to tell people they can
edit the templates on their shopping cart systems without having to
be afraid they'll mess up the php.
You can't have parse errors with Smarty?
It's nice also to be able to tell them they should be able to apply
patches without having to worry about messing up their design
work. And it's alot easier to tell them those things if the system
they're using is built with smarty.
Such a setup is easy to create using plain 'ol (well architected) PHP.
-- John
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net