Page 1 of 1

patTemplate .vs Smarty/Savant/Lozier

Posted: Sun Nov 27, 2005 7:06 pm
by tehtreag
Savant - http://www.phpsavant.com/
Smarty - http://smarty.php.net/
Lozier's Template Class - http://www.massassi.com/php/articles/template_engines/

Are there any plans to include other template engines with the core Joomla release.  I have used FastTemplates, Smarty and Savant in the past.  I am using Brian Lozier's Template Class in my most recent projects. 

Of course, the separation of logic and presentation is important.  But, is it important enough to force people to learn a new syntax to use it.  Read http://www.phppatterns.com/docs/design/ ... te_engines for other opinions on PHP Template engines.

With adequate wrapping Smarty, Savant, and Lozier can be distributed with the Joomla core.  This would allow users to choose the templating engine (I hate that name) they want.

No disrespect to patTemplate, but I find for what it provides, I'd rather use Lozier's class.  The syntax in the template is PHP.  The code in PHP is fairly similar, a) select a template, b) load template variable, c) render template.  And since it is only a wrapper around extract and include, not much in additional documentation is needed, making  Lozier's article all that is needed. 

I have not seen any components or modules utilizing patTemplate, core or third party.  Please point out any if you come across any.  Anyone using the code available in $INSTALL/includes/patTemplate/tmpl/.  It seems interesting, but I have to finish my current project and can't find any docs or examples.

Brian Lozier's class is available on my hosts include path.  I will be using it. 

Savant - http://www.phpsavant.com/
Smarty - http://smarty.php.net/
Lozier's Template Class - http://www.massassi.com/php/articles/template_engines/

Some people like to argue that the template language should be simple enough for graphic designers to use.  I think this is a rather simple view of the world.  Once the designer is producing anything with any complexity, the template language will either not be adequate enough, or wrappers around every available function in PHP.

Why the focus on using patTemplate?  Since all of the others I mention can be (easily) used in Joomla/Mambo, why focus on any one? 

-teh

Re: patTemplate .vs Smarty/Savant/Lozier

Posted: Mon Nov 28, 2005 12:29 pm
by Hackwar
You're free to create your own templateing-engine-add-on for Joomla. Its build that way, that you are able to replace the templating engine if you want. The core will not support multiple engines because its to much work to maintain and the code base would become a lot bigger. Therefor the core will only support one templating engine by default, you would have to download/create others separately from Joomla. Since the devs have chosen pT, I think they will stick with this.

Hackwar