Re: [PHP3] Re: [PHP Template] Re: [PHP3] PHP Template Engine spec revision 0.52
[email protected] (Zeev Suraski) Tue, 21 Mar 2000 19:09:53 +0200 (IST)
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 21 Mar 2000, Andrei Zmievski wrote: > > I too had been following the growth of the Template Engine specification > > but it seemed to be adding layer upon layer of complexity which IMO is > > way beyond what any designer I've worked with could ever manage. > > See example in my reply to Zeev. Once again, it can be as simple or as > sophisticated as you want it to be. Assuming the designers are dumb is, > in my opinion, a real faux pas. And then again, it's not like the > designers will code up a template from scratch. The programmers will > probably set up the skeleton first and then hand it off to the designer. If it can be sophisticated, it means that people who want to read it would have to be familiar with this spec, thoroughly, even if they're already quite fluent in PHP. That's the bad thing. Having the ability to decide whether it's simple or complicated is not a plus, it should be simple by definition. > > IMO the various attempts at developing _templates_ to separate content > > management from processing logic have only gotten more complex (for > > designers) and my hope was for the opposite. > > > > But more important to me now is Zeev's argument that "layering" of > > another language/syntax to perform the same functions as the base language > > is not a good thing. Reflecting on the recent debate from that perspective > > sheds new light on some of my queasy feelings about it. > > Well, I'll be frank. What Zeev and you are doing here is not > constructive criticism. Complaining about the project without offering > any alternatives or solutions is akin to armchair quaterbacking. I am providing a solution - you provided it yourself in your example, that compared how to implement the template if in PHP code. Use PHP syntax for logic, use your templates for presentation. I won't suggest using 'for' loops instead of 'while' loops, which you may consider as constructive criticism. I suggest moving logic outside of the templates engine altogether. Zeev -- Zeev Suraski <[email protected]> http://www.zend.com/