Bob Balaban's Blog


    Bob Balaban


    What if.....DXL? (#1)

    Bob Balaban  April 17 2007 05:00:00 AM
    Greetings, Geeks!  

    This is the first of what I hope to be a series of "What if" postings, where I throw some ideas out there and you carefully consider them and provide me with the fruits of your thinking. You are helping me do my job! Yes!!

    Naturally, the IBM lawyers make me say this: everything I present here is my own personal opinion, and does not represent a promise, a commitment, or even a particularly firm intention on the part of IBM to actually DO anything, necessarily (but, you never know). We're just talking!

    We have this thing called DXL (Domino XML). It's an XML representation of Notes data (or design, which is also data of a kind). Using various mechanisms, you can take a Notes object (document, form, view, an entire database), and convert the proprietary, binary data format that Notes/NSF use in the product to an XML markup. You can also take some DXL and "import" it, converting back to the NSF format.

    This is pretty cool, and useful, too, for a number of reasons. For one thing, the fact that you can do this with ANY Notes object gives you (in theory!) access to all sorts of stuff (especially design stuff) that you can't get at through the normal LotusScript or Java APIs. Our "scripting" interfaces (LS, Java) have tended (deliberately) to focus on data manipulation, not design manipulation. Of course, someday we'd like to do it all, and have everything available via every API, but that hasn't happened yet, and we've always felt that programmable manipulation of data is the more important choice, given limited developer resources at IBM. Besides, there is already a tool that gives you (the Notes/Domino application developer) access to lots of design settings and choices: Domino Designer.

    Of course, having said all that, we've all on one occasion or another had the need (or at least the desire) to modify a view column, or tweak a database property, or create a table with fields in the cells, or any one of a thousand other things that require design manipulation/creation.

    Enter DXL. You can export it. It's XML, so it's mostly just text, so you can edit it. You can import it again. The Import options include things like "update" or "replace". So, instead of having to learn the C API to locate a form in an NSF, and tweak some setting on some field in it, you could just export the form's DXL, edit the stream (or the file) and re-import, updating the form's design. In theory!

    In reality, for most things "round-tripping" DXL does work. But it's not 100% lossless, which makes it inappropriate for many types of applications. There are 3 categories of data that tend not to survive the DXL "round-trip" experience:

    1) Binary stuff, especially crypto data (digital signatures, keys, etc.)
    2) Data that might be new in a new release of the product (a new setting or data type), for which the DXL supporting code has not yet been written.
    3) "Unclean" (my word for it) rich text CD-record data.

    Category 1 is something we could handle with a bit of work. Category 2 will always be a problem (we have the same issue with NotesPeek and other things too), but maybe there's something we could do around our internal development procedures that would help. Category 3 is a potential never-ending black hole of effort, concluding only in the far, far future when the universe experiences total entropy heat-death. Having said that, most of the time rich-text CD records are actually ok, it's just that it's sort of like HTML: some browsers are more forgiving of weird tag layout and ordering than others. People (and software) can put strange rich text into a Notes document, and a lot of times the Notes editor (and other services) will handle it just fine. Some of the time, DXL does not handle it just fine (some of the time, neither does the editor....)

    But, perhaps there is a DXL solution-with-a-restriction: namely, "clean" rich text works, "unclean" rich text might not (but we'd tell you about it, in theory).

    So, Geek Faction, here is the question: What if.....we fixed this to work better? Would you use it? What would you use it for? Archiving? Web app data transfer? Email? On-the-fly design? Tell!

    More to come on this topic....for example we haven't even begun to plumb the depths of the Rich Text Conundrum (no, that is NOT a film with Matt Damon....)

    References (Redbooks):

    "XML Powered by Domino How to use XML with Lotus Domino" --
    "Domino Designer 6: A Developer's Handbook" --