Proposal for OpenMI and Java Interoperability
OpenMI version 1.4 will contain both C# and Java versions of Standard defined.
Java interfaces will be created using semi-automatic procedure and will represent exact mirror of C# version. Except language differences between two frameworks.
In this way both Java and C# users of OpenMI should be happy because they will use framework classes from the platform of their choice: System.* in .NET Framework or org.* in JDK.
For example:
C# version
May look like this:
Java version
After that the following directions have to be investigated in order to re-use components between different platforms:
- Binary converison of Java components implementing Java version of Standard to .NET and adapting them to C# version of interfaces using Adapter design pattern. Conversion should be possible using ikvmc.
- Binary converison of .NET components implementing C# version of Standard to Java and adapting them to Java version of interfaces using Adapter design pattern. Maybe OpenJDK version of ikvmstub.
- Ingetration of two platforms using WebServices or other remoting methods using one of libraries available for both platforms. For example using Remoting in Spring and Spring.NET.
Please note:
- Package names are defined in a way they expected to be:
- org.openmi.standard for Java
- OpenMI.Standard for .NET
- Collection interface like IList<T> defined as corresponding List<T> interface in Java.
- Properties converted to corresponding getXxx() and setXxx() methods.
- Events are transformed to Java analogs using addDataChangedListener(), removeDataChangedListener() in a way they expected to be in Java world.
Conclusions
|
Tools
| Tool | Description | Comment |
|---|---|---|
| IKVM.NET | Binary Java <-> .NET conversion | Latest development version is based on OpenJDK, see blog |
| Grasshopper | Binary .NET -> Java convertion | Does it use ikvm internaly |
| JAD | Converts .class into .java | Also contains GUI called FrontEnd Plus |
Labels:
None