Re: [PHP Template] Re: [PHP3] Re: [PHP Template] Re: [PHP3] PHP Template Engine specrevision 0.52
[email protected] (Zeev Suraski) Tue, 21 Mar 2000 21:15:30 +0200 (IST)
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
You can't write ANY sort of logic in FastTemplates. Thus, you can't replace PHP code with FastTemplates code. This does not apply for the template spec Andrei sent out earlier today. On Tue, 21 Mar 2000, Monte Ohrt wrote: > Hi Zeev, > > I think we're all going a bit overboard on the whole "two separate > languages" argument. Templates allow form to be separated from content. > The PHP scripts and the templates are really two separate beasts, you're > comparing apples to oranges. Look at FastTemplate for example, the > syntax does not resemble PHP code whatsoever. That is because it is a > template, not a PHP script. Whoever said that designers don't want > anything more complicated than Dreamweaver... right on. The templates > engine, at its most rudimentary form, closely resembles the resulting > html pages. If the designer needs a bit more control over the template, > that is what the logic controls are there for. Calling this a "second > language" makes it sound like template logic is a vast complexity like > PHP itself, when in fact it is nowhere near that. It is merely a small > subset of logic to give designers the flexibility they need, with a > syntax that is easy to comprehend (in comparison to PHP) by the non > programmer. > > I think we need to provide template examples. Just looking at the spec > makes it seem much more complicated than it really is. > > Monte > > Zeev Suraski wrote: > > > > On Tue, 21 Mar 2000, Cliff Rowley wrote: > > > > > As far as saying "PHP already does what we need..." is not an > > > argument. Adding a template engine bears no effect on those who choose > > > not to use it. > > > > But it does! Imagine that the template engine goes live, in say, two > > months. After a month, or two months, or half a year - sooner or later - > > people will start using it. They may be 0.1% of the PHP users, they may > > be 20% of the PHP users. They will write code based on this whole new > > language. Some of them will release some of that code in the various code > > exchanges. And wham - someone that until now was quite capable of > > understanding PHP scripts that he downloaded, will now bump into something > > that doesn't even reminds him of PHP, but for some odd reason, is also > > considered PHP code. Time to look for the spec to figure out what it's > > all about. > > > > In my opinion, that's bad. It has nothing to do with the language Andrei > > suggested. He may argue that it's better, I may argue that it's not. It > > doesn't matter. The point is that PHP should not feature two > > completely different syntaxes to do the same thing. It's bad for the > > users. > > > > Zeev > > > -- Zeev Suraski <[email protected]> http://www.zend.com/