Before there were MVC frameworks available in PHP, Smarty was very
useful. It helped keep business logic separate from presentation.
However, within an MVC framework like Zend Framework, Smarty is no
longer needed and actually adds unnecessary complication. As far as I
know (and yes, I used to use Smarty) everything that was possible with
Smarty is now possible with ZF MVC and view scripts.

Smarty solved the wrong problem (I think someone else said this, sorry
that I can't remember who). The problem isn't mixing PHP with
presentation (the problem that Smarty solved), the problem is mixing
business logic and presentation (the problem that MVC and view scripts
solve). Yes, Smarty helped keep your business logic separate from your
presentation layer and it did a good job of this. However, there's no
reason to keep PHP out of your presentation layer (and lots of good
reasons *to* use it in your presentation layer) if you have another
way to keep business logic and presentation separate - which is
exactly what ZF view scripts do.

Thanks,
Bradley

On Wed, Mar 25, 2009 at 12:31 PM, Andrei Iarus <[email protected]> wrote:
>
> Hello there,
>
> A lot have been discussed, but anyway it is still difficult to decide. A 
> project is to be developed, and more persons will have to work at it. Those 
> persons will have some experience in ZF and probably also in Smarty. The 
> problem is: what are the advantages and disadvantages of using ZF Template 
> Engine vs. Smarty. How much of you use Smarty? Why do you prefer 
> Smart/Zend_View?
>
> I see as advatages for Zend_View:
> 1. Some packages from ZF use Zend_View (Zend Layout, Zend Form, other 
> examples?), so if we would use Smarty and use those packages (which we'll 
> do), we will need to extend the abstract classes. Also it is possible that 
> new comming features will use Zend_View.
> 2. Easier to learn than Smarty (right?), as it is clean PHP.
>
> As an advantage for Smarty:
> 1. It is more popular than Zend_View (right?) .
> 2. It has those built-in common-used functions (ex. excaping functions).
> 3. One can say it is easier/more pleasant to develop in Smarty (it is for a 
> long time a stand-alone V(iew) component (from MVC) )
>
> What would you decide if you were in my place?
>
> Thank you very much in advance.



--
Bradley Holt
[email protected]

Reply via email to