[nycphp-talk] Templating engines
Jake McGraw
jmcgraw1 at gmail.com
Wed Jan 23 12:22:14 EST 2008
Another benefit is you (the programmer) have complete control over
what variables get passed from the script to the public facing
template. Hopefully, you've hired a designer that knows better than to
do the following and reveal your db schema to the world:
// Debugging
echo "<!-- QUERY: $database_query, RESULT:
".print_r($database_result,true)." -->";
But if you don't, you won't have to worry with Smarty templates, if it
isn't assign()'ed or append()'ed it won't show up in the template
(though you should watch out for {$smarty.*} variables.
- jake
On Jan 20, 2008 1:39 PM, Kenneth Downs <ken at secdat.com> wrote:
> Gary Mort wrote:
> > Yitzchak Schaffer wrote:
> >> Greetings all --
> >>
> >> The current thread on beginner to intermediate has brought up Smarty;
> >> I have been wondering about the relative advantanges of PHP
> >> templating engines.
> >
> > A templating engine has two purposes.
> >
> >
> > 2) It provides a simplified mechanism for changing the presentation
> > logic, without requiring changes to complex code.
> >
>
> People have tried to convince me to use Smarty for Andromeda and I could
> never quite swallow why because it seemed to me that PHP *was* the
> templating language. I also didn't like what I saw as a lot of
> redundancies involved in invoking a smarty template.
>
> But yesterday Donald Organ convinced me quite thoroughly. The argument
> was that your creative person who doesn't know PHP and never will can
> put a smarty template into Dreamweaver, play around with it, and hand
> you back something that you can just drop in.
>
> Further, since everything we do assumes the presence of a complete data
> dictionary, we can just generate that tedious code that maps smarty
> variables to PHP stuff, and it could be quite a win.
>
> --
> Kenneth Downs
> Secure Data Software, Inc.
> www.secdat.com www.andromeda-project.org
> 631-689-7200 Fax: 631-689-0527
> cell: 631-379-0010
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
More information about the talk
mailing list