My first few years designing procedural applications there wasn't a single
project that didn't incorporate some sort of separation of programming  /
display logic mostly using Smarty. I think the bottom line for me is the
separation of the two is the bottom line, mixing PHP with HTML makes the
code unmanageable and ugly.  Obviously speed wise Zend_View has a major
advantage especially considering Zend Framework OOP model eats up more cpu
cycles than simple procedural stuff.  Again after using Smarty for many
years I've come to the realization that it's more elegant to use a pure PHP
templating engine, even when doing procedural stuff I use an extremely
simple pure PHP templating class. In my templates I try to eliminate as much
PHP as possible concentrating on doing as much business logic in my
controller or wherever  before passing on the data to the display layer.
Zend_View rocks it's the obvious choice for me.

 

Thomas Shaw

[email protected]

[email protected]

 

 

From: Andrei Iarus [mailto:[email protected]] 
Sent: Wednesday, March 25, 2009 11:31 AM
To: [email protected]
Subject: [fw-general] Zend View vs. Smarty

 


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.

 

Reply via email to