Re: Modular: Fusebox & Classes/OOP

From: Date: Wed, 22 Nov 2000 23:50:41 +0000
Subject: Re: Modular: Fusebox & Classes/OOP
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-26761@lists.php.net to get a copy of this message
Michael > > 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? .......... 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. > This is a very good point. I hadn't really thought it through. Many thanks! From this point of view, it is hard to account for the popularity of PHP template parsers.... > > > > 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. Interesting ... I'll have to think this through. The situation I am thinking of is if one of the later HTML includes() was to fail. Wouldn't the earlier screen includes have been output? I am not very clear about the order the PHP parser does things. As you may gather, I am pretty new to all of this, so it probably won't be clear to me till I do some actual testing. > > 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. > Given that you have already put me straight on a couple of points, I look forward to any farther feedback! Thanks again Geoff Caplan British Goldsmiths geoff@britishgoldsmiths.com

« previous php.general (#26761) next »