Monday, June 20, 2005

Bill Seitz agrees about the importance of smart-ascii as fundamental. He says the trick is finding a "style" of plaintext editing that can be rendered to a format that can then provide an outliner-ish view (collapsing hierarchies, etc.) (I'm pretty sure that can still just be HTML v4). And then Transclusion comes next... or an [Outlin Ing] editor that gives you more capability in restructuring the page, but still saves in that Smart Ascii format so you can still get work done in a plain browser window...

I think I like all of this. Today I had a series of small brain-quakes which might have reconfigured the geography of SdiDesk dramatically.

Here's a list of random thoughts.


  • Yep, pages won't change from being smart-ascii underneath.

  • But maybe internally I can represent them as a more tree-shaped structure.

  • A page can be a sequence of PageSections. Each of which can be either a paragraph, or a table or a bullet-list (sub-tree)

  • In fact, in the last refactoring, I experimented with the decorator pattern. Networks are actually decorators for ordinary pages. They implement the "Page" interface, have an inner component which is a MemoryResidentPage, but offer extra functionality. I've been thinking of doing the same for Tables.

  • Now I am wondering if I can define a standard interface called "PageSection" or something : make each object : Page, Network, Table, BulletList etc. implement it. And use it as the basic component of a tree-shaped document.

  • At the moment I have some rather confusingly (clunkily) named function which serialize Tables and Networks into Smart Ascii and parse them back again. (I was calling these serializations the Pretty Persist. And so there were functions like SpitAsPrettyPersist etc.)

  • But the cleaner, more logical thing would be that raw should be a public, string property of any PageSection. And setting it would automatically update the object, and getting it would also get the most up-to-date version.

  • Same could be true of Pages themselves, of course. I would then have a common interface convention for ...



KLUUUUNNKKKK!!!!

This is where it gets awkward. I'd like a fully generic, nestable, recursive structure. That's easy to do internally, but I'm quite a long way from that with my particular markup implementation. Can you do fully recursive in Smart Ascii? How? And how do you stop that becoming as awkward as XML?

I guess that's what Bill means by "a "style" of plaintext ... that can be rendered to a format that can then provide an outliner-ish view"

Hmmm. That was fairly stream of consciousness. I hope it made sense. It helped me anyway. And comments on this, welcome as usual.

ps : Transclusion I already have, of course. (Or at least, including the body of one document in another.) If I could only solve how to embed a network in an ordinary HTML page, then I could make that general as well.
Post a Comment