BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News XobotOS: Android Build on C# Instead of Java

XobotOS: Android Build on C# Instead of Java

This item in japanese

Miguel de Icaza, Mono’s founder, recently announced the creation of the XobotOS research project. XobotOS is the Android operating system with all Java code removed and C# code put in its place. Miguel offers two compelling reasons behind this research project:

Unlike Sun with Java, Microsoft submitted C# and the .NET VM for standardization to ECMA and saw those standards graduated all the way to ISO strong patent commitments. The .NET framework is also covered by Microsoft’s legally binding community promise.

The second is an issue of platform maturity:

Over and over we came back to the basics: Dalvik is a young virtual machine, it is not as performant or tuned as Mono and suffers from many of Java’s performance limitations without the benefit of the high-end optimizations from Oracle’s HotSpot. One crazy idea that the team had at that dinner was to translate Android’s source code to C#. Android would benefit from C# performance features like structures, P/Invoke, real generics and our more mature runtime.

In order to translate the over 1 million lines of Java code in the Android operating system the Xamarin team turned to a project called Sharpen. Using some simple benchmarks comparing generic support in Java and C# they were able to show some significant improvements. The below chart is part of the aforementioned press release:

There is a XobotOS github site available, but Xamarin does not plan on supporting the project directly. Instead they will be using what they learned to improve the performance of their Mono for Android product by replacing performance sensitive code Java code with C# alternatives. In addition to C#’s apparent performance benefits, this would reduce the number of marshaled calls between the Mono and Dalvik virtual machines.

Rate this Article

Adoption
Style

BT