Why use Smarty?
Moderator: General Moderators
-
youropensource
- Forum Commoner
- Posts: 26
- Joined: Tue Aug 05, 2008 11:42 am
Why use Smarty?
Why use Smarty Engine ?
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: Why use Smarty?
For templating?
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Why use Smarty?
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.
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?
Last updated in 2003. That's a little disconcerting.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.
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...
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Why use Smarty?
Why? It's principle and practice remains the same today as it did back then.Last updated in 2003. That's a little disconcerting.
But at least we agree on the most important point that Smarty is a bad choice.
Re: Why use Smarty?
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.PCSpectra wrote:Why? It's principle and practice remains the same today as it did back then.
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.
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Why use Smarty?
I see. You dissecting it way more than I did. I was simply looking at it from the most basic implementation like follows: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.
Code: Select all
ob_start();
include($file_to_template);
$buff = ob_get_contents();
ob_end_clean();
return $buff;
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.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
Cheers,
Alex
Re: Why use Smarty?
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.