Re: template engine...why???

From: Date: Wed, 30 Apr 2003 20:52:39 +0000
Subject: Re: template engine...why???
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-145859@lists.php.net to get a copy of this message
"Rasmus Lerdorf" <rasmus@lerdorf.com> wrote in message news:Pine.LNX.4.44.0304301310500.868-100000@thinkpad.lerdorf.com... > I think you guys are missing the point I was trying to make. My first > point was that it is not possible to build a general-purpose templating > system that won't eventually evolve into PHP. On general principal, I agree with this. The more flexible/powerful you make the templating system, the more you end up with something like PHP. > Then my second point was > that it is very possible to build very specific templating solutions using > PHP. > > So, to answer your question. My PHP template to do what you are after > looks like this: > > <html> > <?user_table()?> > </html> > > And the user_table() function is defined in the template helpers layer. > > As far as I am concerned templates should not have any sort of logic in > them, including iterators. But this is a religious issue that nobody can > agree on and I don't expect to see agreement here. So in order for a designer to change the look of the user table, he would have to edit the user_table() function in the template helpers layer? This seems to me that you are still mixing presentation with code, just obfuscating the fact by breaking things into multiple "layers". --- Seairth Jacobs seairth@seairth.com

« previous php.general (#145859) next »