On Wed, 2002-01-30 at 10:13, Oscar Serrano wrote:
> 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:
> ...
> 
> 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 :-?

IMO, this is an example of the classic trade-off of simplicity versus
flexibility. Editing HTML directly is simple, but having it in one place
where you can call it is flexible. I went through this recently by
including widget-like items for OpenInteract, which look like:

 [% INCLUDE form_text( name = 'blah', value = val, size = 15 ) -%]

You're correct that this is not immediately apparent to newcomers.
However, I believe this is outweighed by the convenience of modifying
one template (form_text) and changing the look for everything at once.
This is particularly convenient for items (like a date-widget) that are
more complex.

As always, TMTOWTDI :-)

Chris
 
-- 
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.



Reply via email to