OpenOffice.org Engineering Lars Oppermann's Weblog

Dienstag Sep 26, 2006

I his recent blog entry Michael Brauer provides some insight into the possibilities of a toolkit for the OpenDocuemnt format used by OpenOffice.org and other open-source and commercial office productivity applications.

Michael proposes the use of a language agnostic approach on the specification of such an API, a direction that I strongly second.

I would however caution the use of an interface description technique which compiles interfaces to the target environment accoriding to a fixed language binding. Just look at what happened to XML DOM, which was also specified with an IDL. It is a pain to use, since it cannot leverage features of the target language in an efficient manner (e.g. collections).

ODF describes a far more complex data model than the plain XML infoset addressed by DOM. So while I am all for specifying the model and the operations that are to be performed on it in a language agnostic way, I caution to use an IDL technique as the tool to do that. The main model should be more abstract. Language bindings should be created on the basis of that abstract model. It is than very well possible to create an IDL binding for that model. This can be used to generate bindings for languages that have an IDL binding but no specific binding for the abstract ODF model.

The whole thing could be viewed like this...

+------------------+---------------+
|  Language A      | Language B    |  
|                  +---------------+
+------------------| IDL Language B|
|                  | Binding       |
|Specific Language +---------------+
|Binding           | IDL Binding   |
|                  |               |
+------------------+---------------+
|        Abstract ODF Model        |
+----------------------------------+
|         ODF XML Schema           |
+----------------------------------+

Kommentare:

Can you explain how you would describe that "Abstract ODF Model" and why you think it is not simply sufficient to describe it in IDL and than assume that languages for which an binding exists just use that binding and languages where such binding doesn´t exist well lets just the say should just try to do something similar to the abstract description in the IDL within the limits of the language. What else would you want? Describe the abstract Model in UML oder plain text? Something completely different?

Gesendet von Bernd Eilers am September 28, 2006 at 05:04 PM CEST #

I think IDL does not allow a good integration into the target environment. UML might be an option, but I think it is too close to programming languages (more like a visual IDL). It might be worthwhile to explore a more formal approach on model definition, e.g. Z-notation, which allows to clearly model the effect of operations (e.g. inserting a paragraph) on the model. Such a model could later be expressed with an interface in IDL, UML or plain Java/Python/whatever and than be implemented.

Gesendet von Lars Oppermann am September 28, 2006 at 05:23 PM CEST #

Senden Sie einen Kommentar:
Kommentare sind ausgeschaltet.