Which Template Engine?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Don Sutter

    Which Template Engine?

    Hello,

    I'm looking for "Template" recomendations for PHP 4, like which one is
    popular or has the best/most features.

    I'm somewhat of a newbie with PHP and bacame interested in templates via
    Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
    website gave me the impression it was designed around php3 and maybe hasn't
    been updated in a while.

    I also ran across patTemplate and Smarty.

    Opinions?

    Thanks in advance

    Don


  • Jan Pieter Kunst

    #2
    Re: Which Template Engine?

    In article <A0%ec.9098$A_4 .4100@newsread1 .news.pas.earth link.net>,
    "Don Sutter" <no@way.com> wrote:
    [color=blue]
    > I'm looking for "Template" recomendations for PHP 4, like which one is
    > popular or has the best/most features.
    >
    > I'm somewhat of a newbie with PHP and bacame interested in templates via
    > Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
    > website gave me the impression it was designed around php3 and maybe hasn't
    > been updated in a while.
    >
    > I also ran across patTemplate and Smarty.
    >
    > Opinions?[/color]

    My opinion is that Smarty rules ... some people think there is too much
    'programming'/logic going on in Smarty templates, but I think that as
    long as it's logic that is solely concerned with presentation it can be
    argued that it belongs in the template.

    Some people also dislike the different Smarty syntax, for example:

    {foreach from=$array key=key item=value}

    instead of

    foreach ($array as $key => $value)

    But I find that it in fact helps me to keep business logic and template
    logic separate.

    JP

    --
    Sorry, <devnull@cauce. org> is een "spam trap".
    E-mail adres is <jpk"at"akamail .com>, waarbij "at" = @.

    Comment

    • Bruno Desthuilliers

      #3
      Re: Which Template Engine?

      Don Sutter wrote:[color=blue]
      > Hello,
      >
      > I'm looking for "Template" recomendations for PHP 4, like which one is
      > popular or has the best/most features.
      >
      > I'm somewhat of a newbie with PHP and bacame interested in templates via
      > Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
      > website gave me the impression it was designed around php3 and maybe hasn't
      > been updated in a while.
      >
      > I also ran across patTemplate and Smarty.
      >
      > Opinions?[/color]

      What about PHP ?-)

      Else, the PEAR library has several templating systems. You may also want
      to have a look at PHPTal, the PHP implementation of Zope's templates.

      HTH
      Bruno

      Comment

      • Tony Marston

        #4
        Re: Which Template Engine?

        If you want to use a templating system that is (a) not tied to PHP and (b)
        governed by W3C standards then I suggest you take a look at XSL. In this
        method all my PHP scripts do is output the data to an XML file then perform
        an XSL Transformation using a predefined XSL stylesheet. I have made my
        stylesheets reusable so that I can produce 300+ pages from just 8 XSL files.

        For more details take a look at
        http://www.tonymarston.co.uk/xml-xsl/index.html.

        I also have a sample application which you can run online which is
        documented at http://www.tonymarston.net/php-mysql...plication.html

        --
        Tony Marston

        This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




        "Don Sutter" <no@way.com> wrote in message
        news:A0%ec.9098 $A_4.4100@newsr ead1.news.pas.e arthlink.net...[color=blue]
        > Hello,
        >
        > I'm looking for "Template" recomendations for PHP 4, like which one is
        > popular or has the best/most features.
        >
        > I'm somewhat of a newbie with PHP and bacame interested in templates via
        > Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
        > website gave me the impression it was designed around php3 and maybe[/color]
        hasn't[color=blue]
        > been updated in a while.
        >
        > I also ran across patTemplate and Smarty.
        >
        > Opinions?
        >
        > Thanks in advance
        >
        > Don
        >
        >[/color]


        Comment

        • R. Rajesh Jeba Anbiah

          #5
          Re: Which Template Engine?

          "Don Sutter" <no@way.com> wrote in message news:<A0%ec.909 8$A_4.4100@news read1.news.pas. earthlink.net>. ..[color=blue]
          > Hello,
          >
          > I'm looking for "Template" recomendations for PHP 4, like which one is
          > popular or has the best/most features.
          >
          > I'm somewhat of a newbie with PHP and bacame interested in templates via
          > Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
          > website gave me the impression it was designed around php3 and maybe hasn't
          > been updated in a while.
          >
          > I also ran across patTemplate and Smarty.
          >
          > Opinions?[/color]

          Please look at the archives. The answer is totally disputed. For
          example, see one of the previous discussions
          <http://groups.google.c om/groups?threadm= c17ndg%24l3t%24 1%40newsreader. mailgate.org>

          Also see:
          1. http://www.phpbuilder.com/annotate/m...hp3?id=1013434
          2. http://www.phpbuilder.com/annotate/m...hp3?id=1013711
          3. http://www.phpbuilder.com/annotate/m...hp3?id=1013461
          4. http://www.phppatterns.com/index.php...cleview/4/1/1/
          5. http://www.massassi.com/php/articles/template_engines/
          6. http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf

          --
          http://www.sendmetoindia.com - Send Me to India!
          Email: rrjanbiah-at-Y!com

          Comment

          • Hayden Kirk

            #6
            Re: Which Template Engine?

            "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
            news:abc4d8b8.0 404140626.2db69 cac@posting.goo gle.com...[color=blue]
            > "Don Sutter" <no@way.com> wrote in message[/color]
            news:<A0%ec.909 8$A_4.4100@news read1.news.pas. earthlink.net>. ..[color=blue][color=green]
            > > Hello,
            > >
            > > I'm looking for "Template" recomendations for PHP 4, like which one is
            > > popular or has the best/most features.
            > >
            > > I'm somewhat of a newbie with PHP and bacame interested in templates via
            > > Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
            > > website gave me the impression it was designed around php3 and maybe[/color][/color]
            hasn't[color=blue][color=green]
            > > been updated in a while.
            > >
            > > I also ran across patTemplate and Smarty.
            > >
            > > Opinions?[/color]
            >
            > Please look at the archives. The answer is totally disputed. For
            > example, see one of the previous discussions
            >[/color]
            <http://groups.google.com/groups?thre...wsreader.mailg
            ate.org>[color=blue]
            >
            > Also see:
            > 1. http://www.phpbuilder.com/annotate/m...hp3?id=1013434
            > 2. http://www.phpbuilder.com/annotate/m...hp3?id=1013711
            > 3. http://www.phpbuilder.com/annotate/m...hp3?id=1013461
            > 4. http://www.phppatterns.com/index.php...cleview/4/1/1/
            > 5. http://www.massassi.com/php/articles/template_engines/
            > 6. http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf
            >
            > --
            > http://www.sendmetoindia.com - Send Me to India!
            > Email: rrjanbiah-at-Y!com[/color]

            Very good reading there..

            I agree, I write PHP using objects for everything. I don't think a template
            engine will help you at all.

            - Hayden


            Comment

            • R. Rajesh Jeba Anbiah

              #7
              Re: Which Template Engine?

              "Hayden Kirk" <spam@spam.co m> wrote in message news:<Wrkfc.472 $cY5.45732@news 02.tsnz.net>...[color=blue]
              > "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
              > news:abc4d8b8.0 404140626.2db69 cac@posting.goo gle.com...[/color]
              <snip>[color=blue]
              > Very good reading there..
              >
              > I agree, I write PHP using objects for everything. I don't think a template
              > engine will help you at all.
              >[/color]

              Actually, when I was forced to use the phpBB like template, I was
              searching for some rational explanations to prove that was messy to my
              boss. I was stopped by those sites that reflected my own ideas about
              the template engines. It is nice to see many people have same opinions
              on this.

              I too use a kind of template system---but is totally powered by
              PHP;-) <http://groups.google.c om/groups?selm=abc 4d8b8.040213054 7.2f09d2af%40po sting.google.co m>

              --
              http://www.sendmetoindia.com - Send Me to India!
              Email: rrjanbiah-at-Y!com

              Comment

              Working...