W3C home > Mailing lists > Public > public-ddwg@w3.org > February 2007

Final info about IDL

From: Rodrigo Garcia Acevedo <rodrigo.garcia@fundacionctic.org>
Date: Tue, 27 Feb 2007 16:16:48 +0100
Message-ID: <09700B613C4DD84FA9F2FEA52188281901DCEEC6@ayalga.fundacionctic.org>
To: <public-ddwg@w3.org>

Hi.

This is the information that completes the one Nacho and I sent regarding the W3C IDL Tools [1]

First of all let me clarify the issue regarding strings in IDL.

The people in the DOM group decided that all strings handled by their API should be UTF-16 strings. The IDL strings aren't UTF-16 (they are 8-bit ISO 8859-1 encoded) and the IDL wstring type encoding is chosen at runtime, so neither of those types fitted into their requirements. The solution was to create a DOMString class by means of a sequence of unsigned short values so all UTF-16 chars could be represented. But if the strict OMG IDL mapping rules are followed, then that sequence would have to be mapped to an 'unsigned short []' in some languages (e.g. Java). The people in the DOM group saw that Java strings were UTF-16 strings and decided not to strictly map their DOMString and instead directly use Java strings [2].


As far as the generation of the IDL interfaces is concerned we have several paths we could follow:

- Use the tools generated by the W3C DOM group [3].
  - Pros
    Already used and tested in other recommendations
    It generates the IDL, Java and ECMAScript bindings, and the HTML docs
    It already has the 'hacks' regarding the string issues.
  - Cons
    Difficult to get it working (lots of lines of code, old libraries)
    There is little documentation about how we should write the XML files
  - Work that should be done
    Grasp how everything fits (the XML, parsers, scripts, etc)
    Write the XML files
    Carry out the conversion process (the easy part)

- Manually write the IDL and use standard IDL compilers to generate bindings to other languages [4]
  - Pros
    The IDL writing should be easy
  - Cons
    There isn't an IDL to ECMAScript compiler
    All the compilers generate CORBA related stuff which isn't needed and would have to be manually removed
    The mappings would be totally strict so the string issue would have to be handled manually
  - Work that should be done
    Write the IDL files
    Write the documentation
    If we want an ECMAScript binding => manually carry out the conversion to ECMAScript (or generate a tool that performs that process, not an easy task)
    If we want a Java binding => choose and execute an IDL to Java compiler and manually remove the CORBA related stuff. It also will be necessary to handle the issues concerning the string handling.
    There are compilers to C++ or WSDL languages among others. Similar steps to those described regarding the Java binding would have to be followed if any other language binding is chosen.

- Only specify a mandatory IDL interface and let other people make their own bindings
  - Pros
    The IDL writing should be easy
  - Cons
    If we don't make clear what solution should be followed regarding the string handling issue, there could appear non interoperable implementations (e.g. one of them mapping strings strictly following the OMG specs and the other using directly Java strings).
  - Work that should be done
    Write the IDL files
    Write the documentation
    Clarify whatever ambiguities could appear (most of them concerning string mapping)

In summary, we have finally found all the tools used by previous W3C groups but there is little documentation about how to use those tools. There are several options and we should decide what the best is.

Regards,
Rodrigo.

[1] http://lists.w3.org/Archives/Public/public-ddwg/2007Feb/0020.html
[2] http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510/core.html#DOMString
[3] http://dev.w3.org/cvsweb/java/classes/org/w3c/tools/specgenerator/
[4] http://www.w3.org/2005/MWI/DDWG/wiki/IDL_Compilers

_________________________________________________________
Rodrigo García Acevedo - rodrigo.garcia@fundacionctic.org
Departamento I+D+i
Fundación CTIC - www.fundacionctic.org
Parque Científico Tecnológico de Gijón
Edificio Centros Tecnológicos
33203 Cabueñes - Gijón - Asturias - Spain
Phone: 	+34 984 29 12 12
Fax:    	+34 984 39 06 12
_________________________________________________________
Received on Tuesday, 27 February 2007 15:17:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 12:13:50 GMT