GTT: Announce & Question

Jonathan Blandford jrb@redhat.com
05 Sep 2001 14:56:06 -0400


linas@linas.org (Linas Vepstas) writes:

> On Wed, Sep 05, 2001 at 11:25:38AM -0400, Jonathan Blandford was heard to remark:
> > IDL is the 
> 
> Comin back at you ...

Wheeeeee!!!!

> I meant IDL in the general sense. There are idls for corba, for rpc.
> ASN.1 is a kind of idl. As are DTD's and XML schemas. 

Fair enough.  I assumed you meant the specific case.

<snip of good discription of various options>

> > > Here's what I really want these days:  an IDL compiler that can read my
> > > IDL, and auto-generate XML readers and writers.   
> > 
> > IDL isn't a file format here.  What you can do is define an interface
> > that describes the data, and pass it across directly
> 
> IDL's generically define interfaces.  Once you've defined an interface,
> you can do three things:
> 1) create language bindings.
> 2) teleport objects across the net (a la rpc or corba)
> 3) define a persistant-object-storage scheme (e.g. xml for a file
>    format). (sql is harder, there are deeper issues).

For GNOME, we use CORBA for 1 and 2, and have don't really have a great
option for 3.  I think most applications use libxml directly with a
DTD.  Additionally, bonobo has a mechanism for storing CORBA_any's
straight to disk.

> > > (I recently wrote xml for gtt, and it is very very repetitive
> > > cut-n-paste, and should really have been auto-gened from an IDL)
> > 
> > Every time I write something that reads xml, I come to this conclusion.
> > I'm not sure what such a thing would look like.
> 
> It would look like an IDL, or a DTD, where you presss a button, and 
> bingo, you've autogenerated code that reads and writes XML that 
> exactly corresponds to saving and restoring the C/C_++/whetever object.

That would be really nice.  One problem of doing this in a generic sense
is that to really do it write requires a lot of the complexity that
exists in libxml (such as type checking, value checking, mapping complex
structs to xml).  Parsing C typedefs is hardly a walk in the park.  I
have a bad feeling that the generic infastructure would be as painful as
the specific one.

> The problem is, unless its integrated into the grander scheme of things, 
> it will remain just another hack.

Indeed.  It's not clear that the current mechanism is a hack; just
tedious.

Thanks,
-Jonathan