ECMASOFT - Publications

Jan 15, 2013

Android is now on C #

Today, two of the world's largest software developers - Google and Oracle - are in competition for the 1 billion struggle reason - use Google Java in Android operating system.
Posted by: admin

However, Java, as we know, is the last method to build applications for Android. Moreover, it is not even the best way. We offer an alternative to Java - C # with high efficiency and low consumption of power. And our platform Mono is an implementation of the open source (source code). NET-platform. This enables Android developers to write the code using C #, Java-using current operating system and share the same code with Windows Phone and iOS. Microsoft presented .NET VM and C # for the standardization of the association of European manufacturers of computers - ECMA and learned about the Certified for ISO standards. Also legal obligations connected with Microsoft and. NET framework.

Last July when Xamarin was preparing to start, we collected our team in Boston to talk about the Android development  and iOS development. We were thinking how to improve battery life of apps on Android and performance. We wanted to make a Mono for Android much better. Many times we come back to the roots: the virtual machine Dalvik is not configured and not as productive as Mono. It suffers from a lot of restrictions and use high-end optimization of the Oracle HotSpot Java. Just as a team we decided to switch to C # source code (source) of Android. Thus, Android certainly could benefit from C # in its technical characteristics.

And regardless of the fact that back then in July, nothing has happened, this is a terrific idea for all of us stuck in my head. If we talk about the events of those times, we again think about improving the performance of our product for Android. As we know, Mono had a large impact on Android. "After all, we could exchange C # and Java, and thus get rid of all kinds of Dalvik limitations in this process", - says the team. "Is it possible to create a phone with Android free Java restrictions Dalvik V?». And then it was decided that all this is quite crazy ideas to test them. We started with a small project XobotOS which performs machine translation from Java to C # of Android.

Research project XobotOS

As for the results of our efforts for today there are many controls and layouts for Android in C #. You can point out some screenshots XobotOS (screenshots of XobotOS) running on Linux (on a Linux workstation), but without Java.

Java transfers through Sharpness

“We started in 2011 with the source code for Android 2.x”? And today, we certainly want to be aware of updated releases for Android. So after 2011 XobotOS was upgraded to Android 4.0.

The main code base for Android 2.x provides about 1 million lines of code in Java. And we know about the possibilities of new releases of Android. But we stopped all work with the same source for Android 2.x back in 2011 when Google open source Sandwich Ice Cream and XobotOS were updated for Android 4.0. Therefore, it was the only right decision for us to make machine translation from Java to C #. And after - the creation and support of the necessary tools in this way.

Sharpen - a tool that we have been using as a starting point. It is famous for using people like Frank Krueger with its port, a Java applet for the IPad. The launch of Sharpen we thought over for a long time. As a result, everyone was able to get a much improved Java-to-C # tool. Now we present a new version of the tool with the code to Sharpen XobotOS. We truly believe that most people will only benefit.


When we returned to the C # Microsoft changed some important aspects of the language. That helped us optimized the process. Thus, the values ​​entered for the presence of type-level overhead costs of small items. Next, C # and Java generics implementation diverged. Java - with full backward compatibility approach. C # - baked support at run time: this has led to simplicity in understanding the generic settings as more complete and powerful. Since then the runtime and language have continued to develop. C # has become a little better than Java. And we tried to bring dynamic programming to the peak of perfection to achieve good implementation of generics. Most of these features were the result of Saima Don’s and his entire teams’ research. He maintained a constant flow of endless ideas that used for development of the programming language.

Among other things, as a virtual machine Mono reached maturity particularly over the last ten years. At the moment it is considered in its eighth generation. Given that it all adds up you have the opportunity to observe a large difference in the performance of generics and structures. Now we are pleased to tell you that XobotOS is available on GitHub. Now you can try it yourself.

Our mission is to provide the best platform for creating applications for mobile. A XobotOS is one of the most readable and the best ways to implement all plans. Yes, it was quite a good experience for us, some technologies were born after prolonged effort. Now we can use them to work on future versions of the product. Now we are working on a direct access to Skia Graphics - Mono for Android access to basic graphics libraries with Java, code for XobotOS and Mono / Invoke to render in Skia.

Java to C # tool is in the updated version of our Sharpen and is part of part of the overall XobotOS work. We now have all the necessary parts of the code for the machine translation for Java with C #. And then, for good performance, C # is able to offer a better solution than Java. Now our plans also include the use of elements of the research project and its integration into their own products. So, the project was approved to operate under our supervision and in the beginning was very interesting. But then we realized that it also had benefits for our products. This is very important to make progress in the work.

EcmaSoft LLC 340 S LEMON AVE #1548 Los Angeles, California 91789