KBD

Keith Devens .com

Saturday, July 5, 2008 Flag waving
The great dividing line between success and failure can be expressed in five words: "I did not have time." – WestHost weekly newsletter 14 Feb 2003
← Does mod_rewrite's last flag do anything?Quote about programming →

Daily link icon Sunday, May 23, 2004

Structured templating

One of the things Nevow, as well as the recent conversion of my site to XHTML, have made me think about is what I can only call "structured templating".

When the output format of your template is something rather unstructured, such as plain text, or even old versions of HTML, you treat your output at the highest level of abstraction you can, which is at the level of strings of text.

However, when your output format is something highly structured, as XML is, it seems that it should be possible to move the level of abstraction up a notch. Not only is the level of abstraction important for "conceptual purity" (ick), but it has the potential to make templating XML (XHTML) easier and importantly, safer. Generating XML is hard to do at the level of text strings. All the broken RSS feeds are a testament to that. Bumping the level of abstraction up is important for correctness.

Nevow seems like it may have a great scheme for exploiting the structure of XML in its templating. I'd like to explore this more, but I'm doubtful PHP is powerful enough to take advantage of this style of templating. I'm going to have to play with Nevow more.

← Does mod_rewrite's last flag do anything?Quote about programming →

Comments XML gif


Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

July 2008
SunMonTueWedThuFriSat
 12345
6789101112
13141516171819
20212223242526
2728293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 5 posts

Recent comments XML

Girls, please don't get breast implants

> And no, you will not be receiving​a picture.

:-(...

Keith: Jul 2, 6:05am

Javascript clone function

This is a clever way to clone an​object if you are using YAHOO UI.​Same tec...

Antonio: Jul 1, 12:47pm

I hate Norton Antivirus

Oh just one other thing norton is​great at keeping people out of your​compu...

kevin.sands: Jul 1, 12:50am

Terminator 3 was awful

I think the biggest reason why T3​totally blew was because Edward​Furlong g...

76.167.172.64: Jun 29, 3:06am

Generated in about 0.106s.

(Used 8 db queries)

mobile phone