Wiki Markup |
---|
{scrollbar} { |
Excerpt |
---|
...
|
...
|
...
ideas |
...
about |
...
development |
...
and |
...
maintenance |
...
of |
...
C# |
...
and |
...
Java |
...
versions |
...
of |
...
OpenMI |
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:
Code Block | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |
| =
|
| ||||||||||
} using System.Collections.Generic; namespace OpenMI.Standard { public interface ILinkableComponent { IList<IExchangeItem> InputItems { get; } IList<IExchangeItem> OutputItems { get; } event LinkableComponentDataChangedEventHandler DataChanged; } } {code} |
May
...
look
...
like
...
this:
Code Block | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |
| =
|
| ||||||||||
} package org.openmi.standard; import java.util.List; public interface ILinkableComponent { public abstract List<IExchangeItem> getInputItems(); public abstract List<IExchangeItem> getOutputItems(); public abstract void addDataChangedListener(LinkableComponentDataChangedEvent e); public abstract void removeDataChangedListener(LinkableComponentDataChangedEvent e); } {code} |
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.
Info | ||
---|---|---|
| ||
|
Tools
Tool | Description | Comment |
---|---|---|
Binary Java <-> .NET conversion | Latest development version is based on OpenJDK, see blog | |
Binary .NET -> Java convertion | Does it use ikvm internaly | |
Converts .class into .java | Also contains GUI called FrontEnd Plus |
Wiki Markup |
---|
{scrollbar}|http://www.ikvm.net]. # 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|http://www.ikvm.net]. # Ingetration of two platforms using WebServices or other remoting methods using one of libraries available for both platforms. For example using Remoting in [Spring|http://static.springframework.org/spring/docs/2.0.x/reference/remoting.html] and [Spring.NET|http://www.springframework.net/doc-latest/reference/html/index-services.html]. 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>|http://msdn2.microsoft.com/en-us/library/system.collections.ilist_members(VS.71).aspx]* defined as corresponding *[List<T>|http://java.sun.com/docs/books/tutorial/collections/interfaces/list.html]* 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|http://java.sun.com/docs/books/tutorial/uiswing/events/actionlistener.html] in Java world. {info:title=Conclusions} * Java developers will use JDK class libraries and .NET developers will use .NET Framework class libraries. The best from two worlds. We do the rest to make them work together * When *functional* changes to OpenMI Standard are required - they should be discussed and accepted in both versions without any exceptions. Any deviations may not be called OpenMI Standard anymore. {info} h2. Tools || Tool || Description || Comment || | [IKVM.NET|http://www.ikvm.net] | Binary Java <-> .NET conversion | Latest development version is based on OpenJDK, see [blog|http://weblog.ikvm.net/] | | [Grasshopper|http://dev.mainsoft.com/Default.aspx?tabid=130] | Binary .NET -> Java convertion | Does it use ikvm internaly(?) | | [JAD|http://www.kpdus.com/jad.html] | Converts .class into .java | Also contains GUI called [FrontEnd Plus|http://www.kpdus.com/jad.html#gui] | |