9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Ian Broster <spam@broster.co.uk>
To: 9fans <9fans@cse.psu.edu>
Subject: Re: [9fans] httpd scripting
Date: Mon,  2 Jun 2003 16:38:18 +0100	[thread overview]
Message-ID: <20030602163818.316ebbf5.spam@broster.co.uk> (raw)
In-Reply-To: <3EDB4C63.5080902@proweb.co.uk>

> the "code fragments in the HTML" model is not very scalable
>
> in fact, content management becomes a total nightmare

I've come to the conclusion that neither 'code in HTML' nor 'HTML
in code' are very good! Neither are easy to read, quotes mess
everything up and it's hard to debug.

My thought is to try to raise the abstraction higher.
Here's how I'd like to code a server generated page.

int some_data[5][5]; /*eg*/
create_my data(some_data);
...
{
 new_web_page(template);
 add(some_data, how_to_add_intgers);
 add(sometext, how_to_add_text);
 ...
 done(); /* composes the page and writes it out*/
}


Note that the ordering is not 'linear'. It doesn't matter which
order the add() calls come. the 'how_to_add_text' things
(whatever they are?) describe how the thing is presented in
the markup language.

Perhaps this has overtones of a Tk-like interface.
Perhaps it's more object oriented. One
day, I'd like to try to find the time to investigate.
Maybe something already exists?

ian


  parent reply	other threads:[~2003-06-02 15:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-01  0:47 Skip Tavakkolian
2003-06-01 13:27 ` Kenji Arisawa
2003-06-01 14:24   ` Skip Tavakkolian
2003-06-01 15:28     ` boyd, rounin
2003-06-01 14:58       ` Skip Tavakkolian
2003-06-01 15:59         ` boyd, rounin
2003-06-01 20:56     ` Kenji Arisawa
2003-06-02 11:55 ` matt
2003-06-02 12:12   ` David Butler
2003-06-02 16:22     ` matt
2003-06-02 12:35   ` Charles Forsyth
2003-06-02 13:08     ` matt
2003-06-02 13:51       ` Charles Forsyth
2003-06-02 15:38       ` Ian Broster [this message]
2003-06-02 16:12         ` matt
     [not found]         ` <e38733ba634d64e975019d2c0de81b2b@proxima.alt.za>
2003-06-02 16:15           ` spam
2003-06-02 17:55         ` Joel Salomon
2003-06-03  9:42       ` Robby
2003-06-03 12:50         ` William Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030602163818.316ebbf5.spam@broster.co.uk \
    --to=spam@broster.co.uk \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).