[PHPTAL] Compare Smart and PHPTAL?

Aaron McClimont aaron at bullmedia.com.au
Fri Jul 29 04:57:20 CEST 2005


Jonathon,

  There really is no comparison, PHPTAL is miles ahead, and you only need
to just start working with objects to realise how many short-falls
Smarty has, and how many nasty hacks you need to do just to get Smarty
working with objects.
  Sure Smarty has support for objects, but it really is very limited.

  PHPTAL also has support for wysiwyg editors... in the way PHPTAL doesn't
break the xhtml standards... try editing a Smarty template in a wysiwys
editor, it's near impossible! ...you just need to know the tal
attributes to put in yourself (not hard, there's not many of them)

  You can also preview PHPTAL templates in a browser before you execute
the php to display it, if you try and preview a Smarty template the same
way you get mostly garbage.
  With PHPTAL templates you can design a single template which is usable
on both static pages and dynamic pages... With Dreamweaver and its DWT
templates, it's very easy to create an entire static site with a few
dynamic sections using PHPTAL which use the same DWT templates.

  PHPTAL also keeps more of the logic back in the PHP code where it
belongs, Smarty is like another complete language in its own right. Read
up about MVC, Smarty can promote breaking out of the MVC ideal.

  Fixing errors in your Smarty templates isn't as easy fixing errors in
PHPTAL templates... for a start, PHPTAL 99.9% of the time gives you line
numbers where you've gone wrong, and useful exceptions to help out too.

  I personally consider Smarty as something that was designed for PHP3,
updated for PHP4, and hacked to work with PHP5.

  Stick with PHPTAL, you won't regret it.

Aaron.



> Hi,
>
> I'm trying to do a quick comparison between Smarty and
> PHPTAL. Can you offer any insights?
>
> I don't quite like Smarty. I suspect PHPTAL may
> soon have WYSIWYG editors supporting it. In fact, I'm
> actually inclined to build such an editor for it.
>
> Jonathon





More information about the PHPTAL mailing list