SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Evangelist N9ne's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    581
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smarty Template Engine Anyone?

    http://smarty.php.net

    Anyone use this? I'd like to hear updated feedback from users of smarty, I'm interested in using it, what are the pros and cons?

    Thanks!

  2. #2
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think it's all right in theory, however, it's basically like writing a programming language using PHP.

    It's slow, and it's overkill for applications.

    IMO, of course.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  3. #3
    SitePoint Evangelist N9ne's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    581
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeff Lange
    I think it's all right in theory, however, it's basically like writing a programming language using PHP.

    It's slow, and it's overkill for applications.

    IMO, of course.
    Can you recommend better template engines please?

  4. #4
    Thinking about Visual Thinking
    Join Date
    May 2003
    Location
    back in South Africa
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read the following discussion about smarty and template engines in general ... ... and make up your mind.

    Enjoy!

  5. #5
    Thinking about Visual Thinking
    Join Date
    May 2003
    Location
    back in South Africa
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by N9ne
    Can you recommend better template engines please?
    I can not recommend one, the choice is alway according to what you would like to have features-wise.

    Look at this thread for a very long list of template engines

    Again, enjoy!

  6. #6
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looked at it a wee while back but had trouble getting it set up ?

    Wouldn't use it though for day to day templating as said earlier, it's overkill.

    Far too complicated and complex to be implemented in your average application; if only they'd think about releasing a 'lite' version huh ?

    Or have they... ?

  7. #7
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't believe there is a Lite version made by the same author, but I believe there may be similar Lighter engines.

    I'd check out the thread mentioned in Post #5.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  8. #8
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Location
    UK
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I find it pretty good for most projects, it's fairly big though, but you can take out the 'plugins' you don't need/use to help

  9. #9
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Smarty is redundant however, IMO. You're simply using a mini programming language within a bigger language that was created for the web in the first place.

    For a good read on template engines like Smarty and why they reinvent the wheel, check out this article (http://www.phppatterns.com/index.php...cleview/4/1/1/) by Harry over at PHPPatterns.

  10. #10
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Harry is also working on a simple template engine, and has posted some examples of it in the Advanced PHP forum.

    I think he may be setting up a dedicated page, maybe on PHPPatterns, might be useful to check out.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  11. #11
    SitePoint Zealot
    Join Date
    Mar 2001
    Location
    North Wales, UK
    Posts
    181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm going to have to get round to writing my rant in defence of template engines at some point...

    Smarty is certainly one of the better ones. Being hosted by php.net gives it a stamp of officiality, and there's a reasonable sized community behind it with some helpful resources (wiki, mailing list, forums...). It does however have a fair number of features you might not use, which is it's main down point.

    As always though, it depends what you want it for.

  12. #12
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here http://www.sitepointforums.com/showp...29&postcount=5 is a somewhat more descriptive post defending the use of Smarty.
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.

  13. #13
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Umm... I wouldn't want to use Smarty myself and I attempt (and so far I'm winning ) to talk people out of asking/requesting it.

    Like earlier said: It re-invents the wheel and for the majority of project's is way too complex... The downloaded version I have on my Desktop (for prosperity. not) is 84K in size...

    That is to say, I've to INCLUDE 80 odd K per page load folks ? No Thanks.

    Shame there isn't a LITE version going about though since that would make a big difference in a lot of folks views; myself included btw

  14. #14
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dr Livingston
    That is to say, I've to INCLUDE 80 odd K per page load folks ? No Thanks.
    A problem which is largely obvilated by a PHP accelerator, which is recommended for a production deployment of Smarty.

    I think with PHP template solutions, it is largly a matter of to each their own. (Perhaps the reason for 100+ solutions? http://www.sitepointforums.com/showt...hreadid=123769 ).

    When selecting libraries/projects for inclusion in any of my projects, I evalute the utility of the solution, and the support and ongoing activity of the development community. I would rather have a group of talented, devoted and creative developers working on enhancing features and optimizing performance of a library I am using, than to select or develop a solution that will forever remain static because I do not have the time to devote attention to it. I believe that Smarty fits into that nitch, and is a fine example of how an open source project and community should opperate.

    But again, to each their own


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
  •