Page 1 of 1

Why use Smarty?

Posted: Thu Oct 23, 2008 4:22 pm
by youropensource
Why use Smarty Engine ?

Re: Why use Smarty?

Posted: Thu Oct 23, 2008 4:32 pm
by jayshields
For templating?

Re: Why use Smarty?

Posted: Thu Oct 23, 2008 4:56 pm
by alex.barylski
Unless your forced into using Smarty (employer/client) don't bother. Use a PHP alternative syntax template engine or just implement one yourself.

Google bTemplate and read that. It does the same thing at a fraction of the cost -- both in learning curve and execution speed.

Re: Why use Smarty?

Posted: Thu Oct 23, 2008 5:04 pm
by onion2k
PCSpectra wrote:Google bTemplate and read that. It does the same thing at a fraction of the cost -- both in learning curve and execution speed.
Last updated in 2003. That's a little disconcerting.

I agree that Smarty isn't a particular good choice though. It's huge. TemplateLite is a better bet. But even that has been almost 2 years since the last update...

Re: Why use Smarty?

Posted: Thu Oct 23, 2008 5:07 pm
by alex.barylski
Last updated in 2003. That's a little disconcerting.
Why? It's principle and practice remains the same today as it did back then.

But at least we agree on the most important point that Smarty is a bad choice. :P

Re: Why use Smarty?

Posted: Thu Oct 23, 2008 5:45 pm
by onion2k
PCSpectra wrote:Why? It's principle and practice remains the same today as it did back then.
Well, it'll have been written for PHP 4.2 at the latest, there'll be no unit tests, there'll be 5 years worth of potentially unpatched holes and exploits, and any bugs or missing features definitely won't be added by the original author. It was only at version 0.3 at the last change, which may well work ok but it's far from a stable major release.

I'm not saying it's unusable or it won't do the job. I'm saying it's disconcerting to use software that's apparently been abandoned in case there are problems. I like the idea of there being some sort of support if absolutely necessary.

Re: Why use Smarty?

Posted: Thu Oct 23, 2008 6:06 pm
by alex.barylski
Well, it'll have been written for PHP 4.2 at the latest, there'll be no unit tests, there'll be 5 years worth of potentially unpatched holes and exploits, and any bugs or missing features definitely won't be added by the original author. It was only at version 0.3 at the last change, which may well work ok but it's far from a stable major release.
I see. You dissecting it way more than I did. I was simply looking at it from the most basic implementation like follows:

Code: Select all

 
ob_start();
include($file_to_template);
$buff = ob_get_contents();
ob_end_clean();
 
return $buff;
 
I wouldn't bother using bTemplate itself but the core idea has remain unchanged.
I'm not saying it's unusable or it won't do the job. I'm saying it's disconcerting to use software that's apparently been abandoned in case there are problems. I like the idea of there being some sort of support if absolutely necessary
Agreed. I didn't really assume anyone would use bTemplate itself as it's so simple in it's basic form (like I show above) I figured most would just develop their own specific to their needs.

Cheers,
Alex

Re: Why use Smarty?

Posted: Fri Oct 24, 2008 2:26 am
by jmut
Currently only reason I'd use smarty is to allow client make custom templates and via smarty don't allow him for full power of php.