Posted on February 9, 2010

Interops: .NET and Mono

@Corbett National Park,Photo by Ajey godbole

Ever wondered a scenario where you want to develop a cross platform .NET application ?

What kind of framework is required for this kind of applications ??

Well lets discuss!

Mono software platform allows developers to create cross platform applications which is an open source implementation of Microsoft’s .NET framework based on ECMA standards.

Main components of Mono

1) C# compiler for compiling C# 1.0 and C# 2.0 features and  additionally many of the C# 3.0 features.

2) Mono runtime which implements Common Language Infrastructure (CLI) , Just-In-Time (JIT) compiler, Ahead-of-Time (AOT) compiler, a library loader, the garbage collector, threading system and interoperability functionality.

3)Base Class Library which provides comprehensive set of classes for building applications.

4) Mono Class Library provides additional classes  for Gtk+, Zip files,LDAP,OpenGL etc.

The whole advantage of this Mono framework is , it provides a framework for user for Cross Platform development which is varied on Linux, Microsoft Windows, Mac OS X, BSD, and Sun Solaris, Nintendo Wii, Sony PlayStation 3, Apple iPhone and many others with a additional advantage that developer is already used to .NET framework and programming language such as C#, VB.NET and Eiffel etc. Scripting and Embedding can also be used for various purposes.

This Wiki Page gives detailed information about Mono framework  and its extensions.

As given on Wikipedia Several projects extend Mono such as

 

 

Updates and Resources

Mono 2.6.1  is now available.

There are various forums and blogs which discuss latest updates about Mono which can be accessed here.

Mono Tools for visual studio is available for download with 30 day trial.

.NET <-> Java Interoperability

 

Jugaad,Photo by Ajey godbole

 

As we have been discussing this earlier necessity of Interoperability arises in various cases such as

  1. Reuse of existing systems
  2. Proof of concepts
  3. Migration
  4. To maintain lower project costs by using existing legacy apps.

Considering above key points, lets check out some of the important aspects related to .NET and Java Interoperability.

While referring to various web sites for practical options available in  .NET and Java Interoperability,  I came across some info given on code project written by Guy Balteriski. This article talks in depth about various aspects related to .NET and Java Interoperability such as

  1. Part I: Introduction to Java & .NET interoperability and the suggested solution
  2. Part II: Implement .NET proxy to the Java classes
  3. Part III: Using Attributes to extend the Java API solution
  4. Part IV: Java to .NET API calls
  5. Part V: Implement Java proxy to the .NET classes
  6. Part VI: Adding Annotations to extend the .NET API solution

JniNetRuntimeArch

A must see website on this topic is jnbridge.

This MSDN example shows  Java/.NET Interoperability with the Microsoft.com Web Service.

Overall with this frameworks and other options a true blend of interoperability can be achieved between Java and .NET for delivering real time problem scenarios.

Hope this helps !

 

Follow

Get every new post delivered to your Inbox.