Hello:
I've been using TT2 for a short time. I love it. But I've seen in a
previous message, somebody was using the CGI.pm plugin so he can write this:

>[% cgi.popup_menu(
>                    name=>"public",
>                    values=>['n', 'y'],
>                    default=>default_value,
>                    labels=>{'n'=>'No', 'y'=>'Yes'}
>                   )
>%]


I don't really understand it. I thing the great thing of TT2 is that you
can write pure (or almost pure) HTML so you don't have to program within
the presentation tier. I mean, if a designer has to make modifcations to
the HTML, it would be easier to him to see something like this:

<SELECT NAME=public>
<OPTION VALUE="y">[%true%]
<OPTION VALUE="n">[%false%]
</SELECT>

or even easier if you use INTERPOLATE:

<SELECT NAME=public>
<OPTION VALUE="y">$true
<OPTION VALUE="n">$false
</SELECT>


my code is pure HTML that every body can modify. You don't have to learn
new syntaxis.  And if tomorrow you decide to use a different module to
CGI.pm you don't have to change your presentation.
As an experienced programmer, when your project starts to grow you like to
have a three-tier model, and the most separated the presentation tier the
most robust your application is. So, why put code within the template when
it is not _completely_ necessary?
Perphaps there is a reason I'm not viewing :-?

Thank you all.

oscar serrano.







Reply via email to