Posted: Thu Dec 15, 2005 6:28 am
Check who the author is...What are the key advantages to using Savant over just putting PHP code in your templates? What does PEAR have to do with Savant?
What Savant does is offer a standardised (read: reusable and simple) approach to including that PHP. Which is basically what most template engines claim to offer - in some way, and actually do (in the cached compiled scripts). It just doesn't claim to separate PHP from HTML which is completely at odds with the true ideal of separating Business Logic from Presentation Logic.
A few other points.
Converting from Smarty to Savant is simple - and I'd recommend having some sort of wrapper (Facade) as a common API to hide which library an application is using. With that - and the relevant templates - you can try out both in similar conditions, or migrate between each as required.
Savant is safe under PHP4 and PHP5 (its error clean except for PHP5 E_STRICT).
If you want to add template security (a common argument for Smarty - probably the only valid one too) Savant allows modules/plugins/extensions. You can add your own compile module for a sub-language if you wish. Point is Savant is pure PHP, unless you specifically want it otherwise - its not forced, and so its ultimately far more flexible than Smarty.
PHP is just too damn easy - someone should have complicated it enough to force anyone wishing to use the language to use the first framework that appeared...Unlike (ASP), PHP is a language where you can construct your own framework. I think that's what makes it so popular. You can include ADODB, PEAR, SMARTY whatever you like into it.