[UPHPU] PHP Framework Project Launch - Coders welcome to attend

Daniel C. dcrookston at gmail.com
Fri Jun 3 09:51:32 MDT 2005

On 6/3/05, Wade Preston Shearer <lists at wadeshearer.com> wrote:
> I don't believe SMARTY syntax to be any "easier" or intuitive for an
> HTML-kiddie to learn than PHP syntax.

I don't remember what smarty syntax looks like, but if I were going to
design a templating system to be as HTML-kiddie friendly as possible
I'd make it look like this:

<foreach data="people" tag="person">
    <tr><td><person field="firstname"></td><td><person

If I were an HTML kiddie I'd find that a lot more familiar than

<?php foreach($people as $person) { ?>
    <tr><td><?php echo $person['firstname']; ?></td><td><?php echo
$person['lastname']; ?></td></tr>
<?php } ?>

seeing as how it looks like a language I'm familiar with.

Now, I'm not advocating creating a template that uses HTML tags like
that.  I agree with you completely.  Well, almost - I agree with you
in principle; it's not *much* harder to learn what the PHP means than
it would be to learn what the HTML-looking tags mean, but the syntax
is a lot different from HTML and so that's going to make it harder to

When it comes down to it, the learning curve of PHP syntax is shallow
enough that it's better in most situations to teach your designers the
syntax than it is to have the overhead of another language on top of
PHP that you need to parse.  I'm just saying, though, there is
something they need to learn (PHP's syntax) that they wouldn't have to
learn with an HTML-like templating system.


More information about the UPHPU mailing list