Re: [SMARTY-DEV] feature request: isa operator
| From: | Wom.bat | Date: | Thu, 19 Jun 2003 00:07:39 +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-1621@lists.php.net to get a copy of this message | ||
full ACK!
David
----- Original Message -----
From: "boots" <jayboots@yahoo.com>
To: "Monte Ohrt" <monte@ispi.net>
Cc: "Smarty Dev" <smarty-dev@lists.php.net>
Sent: Wednesday, June 18, 2003 11:18 PM
Subject: Re: [SMARTY-DEV] feature request: isa operator
> Something else that bothers me about Andrei's comment is this:
>
> I understand that Smarty is often called TOO SOON in the application
> process. For myself, it is usually the very LAST thing that is called.
> Prior to that, all of my application and objects execute and I pass a
> single, fully processed object to Smarty for output and ONLY OUTPUT.
> Within Smarty, my finalized object fairly much does nothing other than
> hold data. It saves me from having to make a lot of Smarty assignments
> when my object already holds the required content.
>
> So I'm using Smarty as a renderer and calling Smarty as a final step of
> my application processing, assigning it a single (perhaps hierarchical)
> object to output. That underlies an assumption that my template has to
> know a few things about the object layout to be able to access the
> data. (This assumption is also present when using Smarty without
> objects, but it is a more global and messy assumption in that case.)
>
> Though I am free to pass any object to any template, that doesn't mean
> that the selected template is actually able to handle that object. I
> could set properties on my objects that describe the object or I can
> write a filter and custom function and do some other hackneyed thing so
> that the templates can decide if it should even BOTHER to process its
> input. OR within the template, I can test the assigned object itself in
> a very clean and simple way (and without any inlined PHP code). That's
> what I decided was best for myself.
>
> Remember, objects can be passed to templates even from within a
> template, so saying that the application programmer is responsible for
> ensuring that proper templates are selected is NOT a good enough
> response.
>
> If you are really talking about separation of business and rendering
> logic, then you bloody well better have proper validation tools on both
> ends of that equation because you can't trust what is coming into your
> interface since you are supposedly isolated from other application
> areas.
>
> Finally, no amount of limiting objects is going to prevent people from
> putting application logic in their templates since doing so is not a
> syntax issue, but instead a "design" (or lack-thereof) issue. I thought
> that was understood.
>
> Greetings.
>
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>