[Prev][Next][Index][Thread]

Re: [OFF] HTML template languages





Ron Franke-polz wrote:
> 
> Now I think this violates you "script that prints" rule - but what the heck.

Eeenyahhh... Not really.

You have a script that contains (or outputs) HTML. What I object to is
that kind of construct that is in turn in embedded within HTML.

I have HTML at the "top level" with some scripting constructs embedded.
OK. You have the scripting constructs at the top level with some HTML
embedded. OK. (BTW I like your backquote/tilde syntax. There's going to
be A LOT of HTML output by this kind of script, let's make the syntax
clear and concise.) Just don't give me the mishmash where some HTML is
top level and some is output by scripts.

IOW, what I think truly stinks is:

<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
  <TR><TH COLSPAN=4 ALIGN=CENTER>
    Pagers: <StupidScript printf ("%d", pager-list.count);> found
  </TH></TR>
  <TR>
    <TH>Name</TH><TH>Dept</TH><TH>Phone</TH><TH>Pager</TH>
  </TR>
  <StupidScript
    (ForEach pg in pager-list)
    { 
      printf ("<TR VALIGN=TOP>")
      printf ("<TD>%s</TD><TD>%s</TD><TD>%s</TD>",
              pg.Name, pg.Dept, pg.Phone);
      printf ("<TD>");
      if (pg.canPage)
        printf ("<A HREF="editmsg.4ds?[PagerNum]=>");
      printf (pg.Num);
      if (pg.canPage)
        printf ("</A>");
      printf ("</TD>");
      printf ("</TR>");
    }
  >
</TABLE>

You and I both are trying to make scripting elements and HTML text fit
together cleanly. You're focusing more on script with HTML added, while
my focus was making the templates look mostly like HTML with a few
control constructs added, with the control constructs blending in with
the HTML.



Follow-Ups: References: