RE: breaking from loops
| From: | Dominique Peretti | Date: | Wed, 27 Feb 2002 15:57:24 +0000 |
| Subject: | RE: breaking from loops | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2864@lists.php.net to get a copy of this message | ||
I don't agree totally with that.
Smarty is more than a template engine.
The "view" has its own logic that shouldn't be dealt with by the "model"
logic.
It's great that Smarty allows total separation of both logics, by giving the
templates advanced functions and control structures.
Moreover, considering the {break} thing, I don't think the impact on
performance would be such a big deal...
Dom.
,-~~-.___.
/ | ' \ Want to make $$$$ really quick? It's easy:
( ) 0 1. Hold down the Shift key.
\_/-, ,----' 2. Press "4" four times.
==== //
/ \-'~; /~~~(O)
/ __/~| / |
=( ______| (_________|
On 27/02/02 16:46, "Brent R. Matzelle" <bmatzelle@yahoo.com> wrote:
> I don't want to be a killjoy to all those who want more functionality
> in Smarty but I believe that the current functionality is more than
> adequate for any programmer. This "break" functionality should be
> accomplished in PHP, end of story. You defeat the purpose of using a
> template layer when you place unnecessary control structures like
> that into it. I have seen many other posts for functionality
> requests along similar lines and I would like them to stop. Smarty
> should be one of the fastest template engines out there but all this
> unnecessary functionality will slow down Smarty's performance while
> not adding much benefit. In the end this code bloat can kill the
> Smarty project as more benchmarks are released. Some recent
> benchmarks prove that Smarty is rather slow right now without an
> accelerator program.
>
> I propose that we lay down some coding laws about Smarty that can be
> placed somewhere on the project page. They might read something
> like: "The Smarty development group will not consider adding
> functionality which can be easily replicated in a normal PHP script.
> If you want a function to be added to your version of Smarty then add
> it on your copy or use the plugin interface. If you think that it
> should be included in the main distribution of Smarty then submit it
> as a plugin only. These rules are in place to make the Smarty the
> purest and fastest template engine out there."
>
> Brent