2004-11-23 Wikis

I finished the prototype for an Oddmuse extension that changes the entire philosophy of Oddmuse: It makes Oddmuse templates-based. Programming new actions is a matter of writing some HTML, and adding processing instructions into the HTML. The code is evaluated and replaces the processing instruction.

The current version can browse pages, edit pages, show recent changes, and a list of all pages.

It feels like reinventing PHP in Perl.

I call it a philosophy change, because currently Oddmuse looks very simple, but it is great for programmers. Pages (and actions) are Perl code. Some of the resulting HTML is very dynamic because of that, eg. the links in footers vary according to how you set it up, what kind of page you’re looking at, and your cookie. This makes a great and flexible tool.

Oddmuse:HTML Templates opens the door for some low-level HTML hacking interspersed with some Perl code. It violates my sense of elegance. The hack itself is elegant, I believe (just look at the size of the extension – only about a hundred lines of code), but the goal itself (template driven “programming”) is ugly.

Oddmuse:HTML Templates

Make sure you follow the links and look at a template example or two.

After all, editing the templates already requires you to have access to the server and intimate knowledge of HTML. If you want to make *functional* changes, you need to do just as much programming as when you edit it directly.

So why did I do it anyway? In some far away corner of my mind, I was curious. Will this enable some quasi-programmer to actually do some programming? Will this enable a new form of cut-n-paste programming? HTML as “glue”? I wonder.

I’m interested in feedback.

Processing Instructions

I used processing instructions because it seemed like the standard-compliant thing to do. Reading up on processing instructions, however, I find that I didn’t provide a !PITarget. ¹

¹

Maybe the first real user will fix this. 😄

​#Wikis