SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Template engine comparable to smarty?

    Well I only really know Smarty, and everyone tends to say that it is bloated.

    I came across Template Lite. Has anyone tried it? How is it?

    Can anyone recommend any other template engines?
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2006
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Search the forums, there is a thread that lists about 50 of them.

    I liked TBS (tinybutstrong.com), but didn't do anything on a production scale with it.

    Ari

  3. #3
    SitePoint Zealot imagize's Avatar
    Join Date
    Oct 2004
    Location
    Australia
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.massassi.com/php/articles/template_engines/

    Maybe this article will kick you in the right direction. Smarty is great for a lot of developers and I used it for a short while myself but after reading the above article I just made my own class. Honestly smarty just provides another interface to php.

    Separation of business logic from presentation logic is important which is why people use smarty because it achieves this with ease. However in my opinion simple php loop syntax is just as easy to learn/use as 'smarty code' (so why re-invent the wheel?). Most designers are not good coders and vice versa, if a designer can learn/memorise smarty code they can learn basic php to put in their templates.

    Every time a page loads cached or not your script must load this huge library. I guess this is why people say smarty is bloated, the caching is great but all the 'smarty template code' could be done without.

    Why not get the best of both worlds, read the article, adapt your own class and implement caching and goodbye smarty. Also for some reason I prefer to use my own things.

    Smarty is not terrible by any means, I'm not bashing it etc. so please don't take this the wrong way smarty lovers.

  4. #4
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the link lionheart - checking it out now
    edit: The most important thing to me right now is that since the templates may be COMPLETELY editable by third party, I don't want them to include PHP code or other "security" risks, which smarty blocks...

    hmm okay, well a somewhat related question...

    Is there some easy method to include/"parse" a PHP file and limit the variables it has access to, functions it can't use, etc?
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •