NYCPHP Meetup

NYPHP.org

[nycphp-talk] To Smarty Or Not to Smarty: That Is The Question

Mikko Rantalainen mikko.rantalainen at peda.net
Tue Sep 5 05:54:23 EDT 2006


Richard Harding wrote:
> LeeEyerman at aol.com wrote:
>>  
>> Can anyone give any guidance about when to and when not to use Smarty?  
>  > ...snip
>> Any information that could assist my reasoning, one way or the other, 
>> would be greatly appreciated!
> 
> If your template designers are not php developers then using smarty as 
> an interface that the designers can use might make some sense. If the 
> guys doing the php are also doing the designing then I would suggest you 
> take a peek at something like Savant or other php based solution.

I'm a bit OOP guy and I still think that I don't need Smarty or any 
other template system for developing applications with (X)HTML front 
end. I haven't yet seen a template system that has the power to turn 
the application to some non-HTTP/HTML based frontend easily. And if 
such template system needs JavaScript for the "HTML" front end, I'm 
not interested.

The reason I think that one shouldn't need a template system is that 
(X)HTML is supposed to be only about the structure and semantics. If 
you don't whip up a <table> element for layout the UI guys don't 
need to modify the (X)HTML source. They just touch the CSS file.

Granted, you may have to give up some designs if you want to stay 
compatible with MSIE 6.0 but in the long run, I believe that using 
(X)HTML for what it's supposed to be is the correct way. (X)HTML is 
a HyperText Markup Language. It's not a Page Layout Description 
Language and Styling Language. If you want the layout the designer 
drew you should be using formats suchs as PostScript, PDF or SVG.

As a side effect, the applications that I've been writing do work 
with mobile phones with 120x120 pixel displays. Show me a page with 
table layout for such a display without writing any custom markup 
for the mobile device.

-- 
Mikko




More information about the talk mailing list