Need a PHP Template Engine – Use SMARTY

POSTED BY on Jun 12 under PHP

If you need a PHP Template Engine then please, use SMARTY. FastTemplate was good when I first wrote it (not great though, since there are at least two places in the code where I’m wasting huge numbers of cycles) but Smarty is a lot… smarter. More importantly it’s updated fairly often.

Due to the dreaded “Work” tag I haven’t been able to update FastTemplate since 1.1, and I’m not going to. The problem isn’t that I don’t have free time to write code, I do. The problem is I’m a professional developer (among my many hats). When I first started tossing my PHP code out for everyone to use I got into huge amounts of trouble with my employer at the time, as technically they could have laid claim to my work despite the fact that I didn’t write any of it on company time or equipment. I was publishing and writing as “CDI” at the time so they didn’t find out right away (took almost a year in fact) and by then the code was already out. So instead of getting into a big knock-down drag-out over the issue we all just agreed that I wouldn’t make any more code for public consumption. I could write for my own personal projects of course, but nothing open source.

That was years ago and I’ve changed employers since then but my job description is pretty much the same so rather than tempt fate with the new employer, the status quo will be maintained. Besides, the code hasn’t been updated in -so- long and there are so many better alternatives now that it’d be silly for me to even try. Use Smarty to handle your template needs or, if you really like TONS of bloat you can use PEAR instead.

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

7 Comments so far
  1. Amy August 6, 2008 9:28 am

    Thanks for the update.

    If I may ask, who was your previous employer? (Who is your current employer?)

    That seem a pretty draconian policy, claiming ownership of everything you write even on your own time and equipment.

  2. Shigit September 15, 2008 1:07 am

    Cool Script, thanks

  3. PB December 3, 2008 1:33 pm

    Personally I’d tell them where to shove their job if I was treated like this. It’s outrageous! If you grew vegetables in your garden would your boss expect you to give him all your potatoes and beans? What you do outside of work hours your busines, as long as it’s not associate with your company or brings it into disrepute.

  4. Valics Lehel January 4, 2009 2:36 pm

    But your work was maintained and improved. We think that cannot compete maybe with Smarty, but we will not change FT to Smarty never :-)
    All of our software are built to FT and will be in the future.

    http://www.grafxsoftware.com/product.php/Fast-Template/26/

  5. George Ojiwa March 22, 2009 12:26 pm

    Thank you very much for the update. Isn’t it a good idea to involve more developers into your open source team so that they can claim ownership instead of you in a restricted employment…

  6. Valics Lehel August 19, 2009 3:56 am

    To George Ojiwa: If you are reffer to our version, it is Artistic License, keep the old license and is open to anyone to contribute (which is already have done by a lot of people) and we keep their contribution public.

  7. lka December 24, 2009 10:13 am

    I disagree. Use PHPTAL!

    Smarty is just same thing as PHP but with curly braces. PHPTAL makes a real difference with syntax-checked(!) XML and automatic anti-XSS escaping.

Copyright The WebMaster’s Net | Powered by WordPress | Using the GreenTech Theme