This proposal is in the Project Proposal Phase (as defined in the Eclipse Development Process document) and is written to declare the intent and scope of the component. This proposal is written to solicit additional participation and input from the Eclipse community. Everyone is invited to comment on and/or join the component. Please send all feedback to the eclipse.technology.emft newsgroup (please prefix the subject with [EMF4Net]).

Background

EMF provides a generic code generation facility for Ecore models and code generation templates for Java. The generated Java code is embedded into a Java framework that supports standard functionalities like serialization, notification, adapters, reflection, and others. The availability of these functionalities out of the box boost productivity of EMF modeling and code generation in comparison to "plain old Java programming".

Neither Ecore nor the EMF code generation facility are limited to Java but provide the ability to generate code for other object-oriented languages like Smalltalk, C++, C#, or Ruby. However, the generation of non Java code alone does not make that code as useful as the Java code generated by EMF, because EMF's core runtime is missing in the non Java languages. This means that a sound enhancement of EMF to other programming languages also need to provide EMF's core runtime for that languages.

C# and .Net

C# is an object-oriented programming language developed by Microsoft to compete with Java. It is designed for server, desktop as well as embedded system environments. C# is the leading language of the .Net initiative and approved as ECMA and ISO standard. The syntax is based on C++ and borrows many aspects from Java and Delphi. C# and .Net are used by a huge development community all over the world.

Due to the intermediate language approach (which is similar to Java's bytecode) and the language independent nature of the .Net platform a program or library written in C# can be used in any program written in another .Net language like Visual Basic or Managed C++. As automatic translations between any .Net languages are possible, a translation of EMF's core runtime to C# is also usable for programmers of other .Net languages.

Unification of UML, XML, Java, and C#

EMF unifies UML, XML and Java at the modeling abstraction level by providing means to interchange any of this "data model" representations. EMF4Net tries to add C# as a fourth interchangeable modeling language to EMF.

Scope

Translation of EMF's core runtime from Java to C#. This includes the translation of the EMF libraries org.eclipse.emf.ecore, org.eclipse.emf.common, org.eclipse.emf.ecore.xmi and org.eclipse.emf.ecore.change.

Creation of an Eclipse plugin that makes the usage and customization of the EMF4Net C# code generation facility as straight forward and easy as possible. The C# code generation customization data is stored in a XMI file (e.g. .csGenModel similar to the EMF .genmodel file) to allow automatic (headless) invocation of the code generation

A wizard that assists the user creating a .csGenModel

Support integration of the generated C# code and the translated EMF core runtime into existing .Net IDEs

A code merge functionality for the generated C# code analog to EMF's usage of JMerge

Import of Ecore models from annotated C# code

Note that the scope can be further augmented as warranted by community interest.

Description

The translation approach of EMF's core runtime from Java to C# is analog to the approach of the NUnit project by translating xUnit to C#: For an initial version transliterate the EMF code to C#. Later on improve the translation by using C# specific language constructs.

Ecore, EMF's features and the EMF implementation are the de facto modeling framework standard and EMF4Net intends to implement this de facto standard in C#.

Added Value

We see the following primary advantages:

Promote Eclipse and EMF as the one modeling framework of choice for common development platforms (like xUnit is the one test framework of choice for Smalltalk, Java, C#, C++ and other programming languages)

Allow current EMF users to seamlessly transfer their modeling and modeling-tools know-how to the .Net platform

Interested parties

Interested parties are welcome to add themselves to the list above or to suggest changes to this document.

Tentative development roadmap

A test-driven development approach is intended for the translation of the EMF core runtime. Existing and new JUnit tests for EMF functionalities are translated into NUnit tests. Then EMF code is translated from Java to C# until the NUnit test succeeds.

Currently we intend the following translation order of EMF functionalities:

Adaption of EMF's Java code generation templates for C#

Translation of the org.eclipse.emf.ecore and org.eclipse.emf.common libraries