• Jere

    Jere - 2006-02-11

    How about using templates (e.g. Smarty) to separate PHP code from HTML? It shouldn't be complicated to use templates with current code

    • Benjam

      Benjam - 2006-02-13

      I fail to see how that would make things easier.

      It's like writing code for a script that will write code for a script.

      Wouldn't it be just as easy to create a home grown template that does the same thing?  Without going through two or three different scripts to get the same output?

      in Smarty it would be like:

      in a home grown template it would be like:
        <div><?php echo $foo; ?></div>

      Don't get me wrong, I'm all for saving keystrokes, but if those savings come at the price of an overly bloated product, then no thanks.

      Or am I missing something?

    • Jere

      Jere - 2006-02-14

      Sorry, but templates are standard for all "hi-end" applications. Templates allow to have separately code and "visualisation".

      Try http://smarty.php.net/whyuse.php :)

      • Benjam

        Benjam - 2006-02-14

        I understand the need for a separation of design and structure.  But why do we need to use a third party script to be the middle man for the middle man?

        It just adds clutter to the filesystem, and more code to break.  There is really no need for it.  It can just as easily be done with home grown templates and crafty functions.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks