(picture)

July 01, 2002

Structured code-containers

Following from the tour discussion, I want to ramble awhile about "structured code-containers", as I think it's an interesting perspective.

Mostly any software system (of any size) is a framework for stringing together pieces of code. The DOS/Windows filesystem and PATH is a framework for finding and launching executables (albeit a fairly uninteresting one). At another extreme, Web Services with WDSL and UDDI is a decentralised framework for having different pieces of code - hosted in different places - execute when different events happen. OO programming in general puts code into a containment structure which

  • controls "scope" via namespace (so you can see where your code lives, and manage the scope of its effects)
  • provides an event system (to pass control to different pieces of the code in a known sequence, and other forms of inter-object communication).
Where these containment structures are interpreted rather than compiled, the framework is extremely open: it's editable by an end-user. So, to take a few examples: Radio Userland (script code in an outliner); LambdaMOO (code in a multi-user object database); Lotus Notes (macro or script code attached to objects in a replicated database); Unix shell (and that #!/usr/bin/executable directive); Groove Forms (script code attached to form objects).
Groove Tour was designed to be that, too.

The core of Groove is pretty open - and very very flexible - from the same viewpoint. There's an optional "text/binary phase boundary" so you can wrap compiled code behind any COM interface, but you can also write code in script (and most Groove tools are script). The first-level container is an XML document (a tool template, typically). The next-level container is an XML database (the templates storage, or the shared-space storage, or the account storage).

So, this is another thing in common between all these interesting systems: a deliberate commingling of code and data. Storing code in a database, and being able to manipulate that same database from code.