Hacker News new | ask | show | jobs
by TeMPOraL 4905 days ago
I don't know why. When I came to the project, it was already there - the company has its own framework.

My guess is that whoever wrote the framework just heard about Smarty while in university, long time ago.

2 comments

My company also uses Smarty, but we're planning to move away from it. (Currently evaluating Mustache.php)

Smarty's parser/lexer is horribly slow. The 3.1.x branch has caused problems for us, such as corrupted compiles and broken nested blocks [1]. As evidenced by the article, the developers don't seem to know what they're doing. You should see the workaround for people with custom error handlers -- registering another error handler on top that checks the source of the error against registered template and cache directory paths!

[1] The bug was introduced in this particular commit (lines 237-241 of r4505): https://code.google.com/p/smarty-php/source/diff?spec=svn450... and later "fixed" here: https://code.google.com/p/smarty-php/source/diff?spec=svn456...

sounds about right. I don't think anyone would choose Smarty for actual technical reasons at this point. I personally think plain PHP makes a far superior templating system. Smarty is slow, doesn't "protect" designers from any complexity because it's complex itself and is yet another thing to learn.