Re: [SMARTY-DEV] feature request: isa operator

From: Date: Mon, 23 Jun 2003 22:27:20 +0000
Subject: Re: [SMARTY-DEV] feature request: isa operator
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1683@lists.php.net to get a copy of this message
--- Andrei Zmievski <andrei@gravitonic.com> wrote: > On Wed, 18 Jun 2003, boots wrote: > > Exactly, isa DOES NOT imply business logic in the template. > > Perhaps by itself it does not. But it does indicate a trend that I > can only call alarming to expore more and more of PHP's functionality > to the templates, whether through a direct access or a masqueraded > one. And each subsequent feature only makes it easier for template > developers to violate the MVC principle. Hi Andrei. Thanks for writing back. Let me ask: since when does Smarty enforce or require an MVC methodology? MVC is only one design pattern and thankfully, it is not the only one that Smarty can be used with. Cripes, PHP is not even a full OOP language, so why suggest that Smarty MUST be a MVC pattern enabler? Further, as you implied not objects nor the change I suggested negate those usage patterns. Yes, more rope to the clueless--but the clueless can blow themselves up with a tissue. I understand your issue, but I suggest you are trying to throw the baby out with the bath water. > > evaluation. Objects are indeed part of Smarty and some very smart > > people happen to be using them in their template designs. > > And some very smart people invented sarin and hydrogen bomb. That's > not much of an argument. There is no compelling reason to use objects > in Smarty templates, IMHO. That was not an argument, Andrei--that was an alternate characterization to your implication that only a complete idiot would use objects in a template. To counter your counter-argument, let me agree by saying that for some reason, some very smart people are suggesting against using objects in templates. That doesn't make them right either, correct? I'll say it again. Objects are a valid type and variable in PHP. Smarty is a PHP specific template engine -- it replaces variables. Ergo, it must support objects on PHP. Very simple. Otherwise an objects have to turned into arrays (perhaps nesting) so that they can be assigned to Smarty. How wasteful is that? Please note, in my case, I only use objects in my templates as typed arrays--hence the need for isa. Do you not see any value to that? Perhaps not, but I also know that I am not alone in my thinking. Finally, is someone willing to declare exactly what they mean when they say something doesn't belong in a template? You have no idea how I am using my templates, how do you know what should go in them? Smarty is NOT a rigid framework. I REPEAT, Smarty is NOT a rigid framework! xo boots __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com

« previous php.smarty.dev (#1683) next »