Re: [PHP3] Re: [PHP Template] Re: [PHP3] Template Discussion
[email protected] (Gary Bickford) Thu, 23 Mar 2000 08:49:22 -0800
| Newsgroups | php.template |
|---|---|
| Organization | FXT Corporation |
| Message-ID | <[email protected]> |
Geesh. :O) I opine that the term "macro" might be better from a conceptual point of view than "template". It makes plain that this is an extension, that it is not a new syntax except in the most basic way (like arrays and objects were added syntax), and that it is a part of the PHP language. And I agree (not that I deserve to have any clout here - count the lines of code I wrote in building PHP!! :O) that this can be a handy tool for 'abbreviating' sections of code and for providing some simple higher level constructs -tools, widgets- that can be supplied to, for example, Dreamweaver users. I have complete faith that all y'all can dance that delicate line between too much and too little that Rasmus referred to, regarding whether and how much flow logic to include. My inclination would be 'no flow logic', as this makes a strong line that seems to fit with the thought process of those non-programming designers I know. Flow control scares them anyway. Those who want to use flow control can start learning the rest of PHP. I would just add one thought - would building an XML DTD incorporating PHP macro/template definitions, or some similar XML integration with PHP, provide the same result? This appears to be the industry direction. I don't mean this to derail the template (macro:O) effort, but to suggest a longer term direction. If I understand correctly, an XML DTD that incorporates PHP actions as entities (not sure that's the right term) would allow any XML document to invoke those actions without any commotion or even awareness by the writer. For example, if the DTD defined <title> to include some PHP code, then anyone using <title> will invoke that code without even knowing it.