Hello,
These two seem about equal, however I'm leaning towards Flexy.
Here's my reasoning below, anything missing?
(I've searched but can't find much discussion of smarty vs flexy out
there)
Both are trivial to introduce to the project in terms of setup.
Both achieve HTML template pages and code-behind pages.
Smarty seems to have been around longer and is the templating engine
underneath Tiki.
Flexy has PEAR status, in addition seems to be doing the "right
thing" in terms of expressing the templating within attributes (much
like ATG Dynamo Droplets did the right thing, but was overruled by
marketing). So in this case engineering and marketing are aligned
(Flexy is the one with PEAR status).
These two examples are both actually well-formed, but Smarty
accomplishes it's task with the "markup code" outside of tags,
and Flexy does it within attributes.
For example a loop in Smarty:
<table>
{section name=mysec loop=$users}
{strip}
<tr bgcolor="{cycle values="#aaaaaa ,#bbbbbb"}">
<td>{$users[mysec].name}</td>
<td>{$users[mysec].phone}</td>
</tr>
{/strip}
{/section}
</table>
Versus a loop in Flexy:
<table class="wide" cellpadding="5" >
<tr>
<th>{translate( #Name#)}</th>
<th>{translate( #Street#)}</th>
<th>{translate( #City#)}</th>
<th>{translate( #State#)}</th>
<th>{translate( #ZIP Code#)}</th>
</tr>
<tr flexy:foreach=" aContacts,conta ct">
<td>{contact.na me}</td>
<td>{contact.st reet}</td>
<td>{contact.ci ty}</td>
<td>{contact.st ate}</td>
<td>{contact.zi p}</td>
</tr>
</table>
Thanks in advance for your kind response,
-Rich
These two seem about equal, however I'm leaning towards Flexy.
Here's my reasoning below, anything missing?
(I've searched but can't find much discussion of smarty vs flexy out
there)
Both are trivial to introduce to the project in terms of setup.
Both achieve HTML template pages and code-behind pages.
Smarty seems to have been around longer and is the templating engine
underneath Tiki.
Flexy has PEAR status, in addition seems to be doing the "right
thing" in terms of expressing the templating within attributes (much
like ATG Dynamo Droplets did the right thing, but was overruled by
marketing). So in this case engineering and marketing are aligned
(Flexy is the one with PEAR status).
These two examples are both actually well-formed, but Smarty
accomplishes it's task with the "markup code" outside of tags,
and Flexy does it within attributes.
For example a loop in Smarty:
<table>
{section name=mysec loop=$users}
{strip}
<tr bgcolor="{cycle values="#aaaaaa ,#bbbbbb"}">
<td>{$users[mysec].name}</td>
<td>{$users[mysec].phone}</td>
</tr>
{/strip}
{/section}
</table>
Versus a loop in Flexy:
<table class="wide" cellpadding="5" >
<tr>
<th>{translate( #Name#)}</th>
<th>{translate( #Street#)}</th>
<th>{translate( #City#)}</th>
<th>{translate( #State#)}</th>
<th>{translate( #ZIP Code#)}</th>
</tr>
<tr flexy:foreach=" aContacts,conta ct">
<td>{contact.na me}</td>
<td>{contact.st reet}</td>
<td>{contact.ci ty}</td>
<td>{contact.st ate}</td>
<td>{contact.zi p}</td>
</tr>
</table>
Thanks in advance for your kind response,
-Rich
Comment