1. Welcome!
    EosAlpha BBS is a fork of the popular Simple Machines Forum software. We aim at creating a new forum software, adding several new features and a modern and fresh design on top of the existing SMF code base.

    This software is currently in an early stage of development and this forum acts primarily as a testing platform for the ongoing development.

    Feel free to look around to get an idea about how it feels and looks.
View in topic context
Re: To twig or not to twig |
June 27, 2012, 20:26:01
Hey there.

I was recently searching for sphinxsearch smf on google which led me to your fork. What caught my attention on your page were actually the privacy-enabled Like-thingies on the right, and that you were the author of tabsrmm and clist nicer, both of which I used for a while back in the day. Most importantly, you develop using git (and on github!), which is always a huge plus. Anyways I looked around for a bit and I must say I love what I'm seeing, concepts and implementation. Great job overall, thank you for your work! Hope to see a release of this some day!

Ok, on topic now.

I read your arguments, but I am not convinced using Smarty is a good idea: The performance cost is not that insignificant, it might be "only a few milliseconds", but those milliseconds are actually a 25% increase. More importantly though, I was always sceptical about the practical use of smarty. It's additional syntax one has to learn so it's not really easier to get into. Security doesn't really matter because this isn't a scenario where template code comes from an untrusted source. And the code is really not that much cleaner than just writing plain php - although that's obviously an opinion. Still, to me the little benefits seem far from worth the cost.

To actually benefit from a layer between php and html, I would expect something that has syntax which is actually easier to write than plain html, like haml. Smarty just seems like a half measure to avoid using the echo statement in comparison.

You mentioned plugin architecture there, maybe that's the bit I'm not seeing. Could you elaborate on why you think a template engine (or smarty in particular) could be worth the cost here?

 - Valodim
2 Like It