Re: Modular: Fusebox & Classes/OOP
| From: | Michael Kimsal | Date: | Wed, 22 Nov 2000 22:49:26 +0000 |
| Subject: | Re: Modular: Fusebox & Classes/OOP | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26751@lists.php.net to get a copy of this message | ||
I've not time to comment on all this right now, but you bring up
interesting points. I will comment on:
Geoff Caplan wrote:
> 5) So now we include() our screen templates, which have been set up with the
> usual {placeholders} for the dynamic_data, and the last step is to call the
> parser, substitute in the variables, and print() the results.
>
Any reason why you don't just do <?=$data;?> instead of {placeholder} in
the templates?
Above, you wrote
3) A fast and light template substitution parser to allow the separation of
HTML and PHP in the content "screens", as the HTML components are called in
FreeEnergy.
The PHP engine *is* a 'fast and light template substitution parser'.
Yes, extra templating layers buy you things like looping result sets, etc.,
but you can easily write a loop or function to do the same thing. Only
real benefit I see of using a full 'template system' is cross-platform
compatibility. Were you to want to reuse the same templates
under ColdFusion or ASP or Java, having *only* placeholders and template
"functions" in the template would ensure that you could write
equivalent template systems under those other platforms.
>
> 6) Meanwhile, we have been buffering the output. If we suffer any fatal
> errors, we abort the page and redirect to present the customer with a
> friendly apology and suggestions for how to continue.
>
What output would there have been up to that point? I'd have thought
that all the processing would be putting info into variables for the template,
nothing else.
As I wrote before, not enough to time to reply to everything right now,
and you do raise good points. Let me get back to you on these.
Thanks!
==========================
Michael Kimsal
http://www.tapinternet.com
PHP Training courses
http://www.tapinternet.com/php