Re: [SMARTY-DEV] Var Templates
| From: | Wom.bat | Date: | Tue, 15 Apr 2003 23:38:12 +0000 |
| Subject: | Re: [SMARTY-DEV] Var Templates | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1176@lists.php.net to get a copy of this message | ||
I think you're quite right, Smarty is probably the fastest template engine
around, and even if it wasn't, I could still easily accept the lack of
performance, as it would be worth the outstanding flexibility and power.
It's in everyone's interest if certain things are kept out of the engine
itself (though I do thing that this specific one is acceptable when
implemented into the core)...
But I guess it's just natural if something grows if it's development is
pushed further and further, and as long as the performance doesn't suffer,
you can bet that I won't stop those guys from coding on ;) (I'm really
looking forward to that {nocache} thing... :))
Perhaps the question simply goes away from coding itself and becomes more
abstract (do I want this cupholder in my car by default, or shall it be
optional)... I personally wouldn't like certain things being kept apart from
the engine, and I bet that its overall faster to implement it into the core
than delievering it as a plugin...
Just my 2 cents,
David
----- Original Message -----
From: "boots" <jayboots@yahoo.com>
To: <smarty-dev@lists.php.net>
Sent: Wednesday, April 16, 2003 1:09 AM
Subject: [SMARTY-DEV] Var Templates
> Hi all.
>
> FWIW, I've been casually following the long discussion on backticks and
> automatically expanding vars as if they were themselves templates. I
> think it was Tom Sommer who initiated that discussion, but if not, he
> certainly has put a lot of interesting details on the table.
>
> One thing I am uncertain of is the need for such a thing in the base
> Smarty engine. From Monte Ohrt's comments, it looks like this type of
> change has potential to wreak havoc with performance and in the end,
> I'm not sure why anyone would REALLY need this feature--at least in the
> engine core. There are two issues I'm concerned about:
>
> 1) there seems to be a push to program general COMPUTATION using the
> template facility instead of PHP code. I'm -1 on that because I think
> that as much as possible, logic should be handled in the PHP code.
> Otherwise your templates aren't really templates, are they? In other
> words, if you want to evaluate a var using templates and then use that
> value in another template, you should probably do the first evaluation
> in PHP and pass the results to the second template. Both your code and
> your templates are likely to be a bit more stable in that case.
>
> 2) I want the base Smarty to stay as minimally small (and fast!) as
> possible. IMHO, anything that can be implemented effeciently using the
> Smarty API (ie. plugins, resources, filters) should be factored out of
> the engine.
>
> For example, the functionality that Tom is talking about can likely be
> created using a custom Resource. I posted a very simple Global Var
> template reader to the Wiki back in september that shows how to go
> about doing a similar thing (it would have to be expanded to meet Tom's
> criteria). The point is, is that there is a LOT of room to extend
> functionality without trying to shoehorn everything into the core. This
> is especially true for the more abstract and escoteric features that we
> developers sometimes crave :).
>
> xo boots
>
> __________________________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo
> http://search.yahoo.com
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>