SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Jun 2006
    Location
    LinkChannels.com
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Recommended Template Engine for PHP

    i just want to know your inputs on what template engine you use when building a site.
    LinkChannels Web Directory - Human-edited web directory.
    ArticleWheel - Article Submission Directory

  2. #2
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,053
    Mentioned
    66 Post(s)
    Tagged
    0 Thread(s)
    PHP itself.

  3. #3
    SitePoint Enthusiast praveenkv1988's Avatar
    Join Date
    May 2011
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I recommend smarty. Its widely used and provides better performance.
    Happy Hosting
    Managed VPS Hosting with CPanel/Plesk/DirectAdmin.
    Managed Windows / Linux Dedicated Servers.

  4. #4
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by praveenkv1988 View Post
    Its widely used and provides better performance.
    Better performance than what?

    My recommendation? Twig.
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.

  5. #5
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,053
    Mentioned
    66 Post(s)
    Tagged
    0 Thread(s)
    smarty is for dummies. PHP *is* a template engine. Putting a template engine in PHP is like buying a semitruck, then towing the semitruck around with a pick up truck.

    I've had this rant before and am not going to do it again. Do a search of posts I've made containing smarty and you can read the previous rants. Smarty is the worst thing you can do to your code.

  6. #6
    SitePoint Zealot
    Join Date
    Oct 1999
    Location
    France
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will confess: when I want templates, I use FastTemplate. It's old and unsexy. But it's fast, easy to use, and it keeps all the logic in the PHP code where it belongs. The templates can easily be edited by someone who knows nothing about PHP; they have no PHP tags in them to inadvertently get messed up or deleted -- just variable names surrounded by {}. Works for me.
    --
    Veronica Yuill
    Archetype IT

  7. #7
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are some advantages to using smarty, Twig, etc but you should clearly understand those benefits before determining whether to use Smarty over PHP - typically PHP is a acceptable template engine.

    Cheers,
    Alex
    The only constant in software is change itself

  8. #8
    SitePoint Member
    Join Date
    Jan 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking

    Quote Originally Posted by AnthonySterling View Post
    Better performance than what?
    Here a good benchmark that shows template engines performances

    I use Rain TPL, it's the simplest to use and so far the faster, create template is fun and give me satisfaction

  9. #9
    SitePoint Zealot
    Join Date
    Oct 1999
    Location
    France
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by feul79 View Post
    Here a good benchmark that shows template engines performances

    I use Rain TPL, it's the simplest to use and so far the faster, create template is fun and give me satisfaction
    wow! I've never used Smarty, and that benchmark doesn't encourage me to start. 10x the execution time of native PHP?
    --
    Veronica Yuill
    Archetype IT


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
  •