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

Re: [OFF] HTML template languages



>>>>> "Ron" == Ron Franke-polz <ron.franke-polz@iac.honeywell.com> writes:

    Ron> Scott Ribe wrote in message <38DA519F.F73EE2CB@miqs.com>...
    >> 
    >> I just made a crack about the ugliness of "JavaScript and
    >> similar approaches where HTML contains a tag that contains a
    >> script that "prints" HTML out as a side effect" [..]
    >> 
    Ron> [snip]

    Ron> Just to make this post slightly relevant to Dylan, here's a
    Ron> cobbled up sample of what (I think) you're trying to do in a
    Ron> macro pre-processor that I'm writting in Dylan called M6.

An approach which has been used in practice for some time is LAML:

  <URL:http://www.cs.auc.dk/~normark/laml/>

It is based on Scheme, but I think the ideas would carry over to Dylan
without too much friction.  The basic idea is that the web page is
written as a term; this term is evaluated, yielding a string which is
the HTML document.  This may happen when the page is delivered (sounds
slow but is often no problem) or just once after each change (run
"make", and there's your new and better web-site in ordinary HTML).

In any case, the term may have a similar structure as the HTML page
(to make it easy for HTML'ers to get used to it), but it may also be
significantly different---using the abstraction support in the
programming language to write it in a content-oriented, "logical"
style, and then let the term evaluation process insert all the
nitty-gritty details as appropriate.  

The HTML-with-embedded-scripts approach would not, IMHO, be able to
support abstraction in such a profound way, you really need to work
directly with a real programming language for that.


  regards,

-- 
Erik Ernst                                    eernst@cs.auc.dk
Department of Computer Science, University of Aalborg, Denmark



Follow-Ups: References: