Close
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
Read Down
Sign in
Close
Welcome!Log into your account
Forgot your password?
Read Down
Password recovery
Recover your password
Close
Search
Logo
Logo
  • Latest News
  • Artificial Intelligence
  • Video
  • Big Data and Analytics
  • Cloud
  • Networking
  • Cybersecurity
  • Applications
  • IT Management
  • Storage
  • Sponsored
  • Mobile
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
More
    Home Development
    • Development
    • Mobile
    • Networking
    • Servers

    Google Could Have Used C# for Android: Xamarin

    Written by

    Darryl K. Taft
    Published May 3, 2012
    Share
    Facebook
    Twitter
    Linkedin

      eWEEK content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

      Xamarin has ported Google€™s Java-based Android software to use C# and the .NET framework.

      In light of the ongoing legal battle between Google and Oracle over Java, this development proves that there are options for Google if Oracle triumphs.

      The research project, called XobotOS, ported Android 4.0 from Java/Dalvik to C# to explore the possibilities of improving the performance and memory footprint benefits that C# brings in by leveraging the best parts of .NET/C#, such as real generics, P/Invoke, structures, etc. And they have opened the source code for it under Apache 2.0 License.

      Xamarin CTO Miguel de Icaza, in a blog post about the project, said:

      €œJava is not the only way to build native apps on Android. In fact, it€™s not even the best way: we have been offering C# to Android developers as a high-performance, low-battery-consuming alternative to Java. Our platform, Mono, is an open-source implementation of the .NET framework that allows developers to write their code using C# while running on top of the Java-powered operating system, and then share that same code with iOS and Windows Phone.€

      Indeed, de Icaza added, €œ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.€

      Indeed, in a 2005 email, Andy Rubin, Google€™s Android chief told the company’s co-founder Larry Page: €œIf Sun doesn€™t want to work with us, we have two options: 1) Abandon our work and adopt MSFT CLR [Common Language Runtime] VM and C# language; or 2) Do Java anyway and defend our decision, perhaps making enemies along the way.€

      De Icaza said Android€™s Dalvik is a young virtual machine and is not as tuned or performant as Xamarin€™s Mono. So the Xamarin team set out to swap Java with C# and avoid the Dalvik limitations. Thus far, the result is that the team has most of Android€™s layouts and controls entirely in C#, de Icaza said.

      The team started with a Java translation tool called Sharpen from db4o, which is an open-source Java to C# converter. In the process, the Xamarin team matured the Sharpen tool to improve its Java-to-C# translation capabilities, and on May 1 released a new version of Sharpen along with the code for XobotOS. XobotOS is available on Github.

      As a result of their efforts, Mono now blows Dalvik away in benchmark tests, de Icaza said. However, he said, €œOur goal as a company is to provide the best platform for building mobile apps, and so XobotOS will not be a focus for us going forward.€

      However, de Icaza in his blog post pointed to a few technologies that have come out of the effort that Xamarin will be able to include in future versions of its products:

      • Direct graphics access to Skia: Currently Mono for Android accesses the underlying graphics libraries through Java; with the code that we built for XobotOS, we will skip the middleman and use Mono€™s P/Invoke to get straight to the native rendering code in Skia.
      • Java to C# tooling: Our new version of Sharpen is available as part of the XobotOS release.
      • Replacing Java code with C# code: We now have the tools necessary to replace some chunks of Java code with C# code where performance is critical and when C# can offer better solutions than Java has. Our plan is to take elements of the research project and integrate those into our products.
      Darryl K. Taft
      Darryl K. Taft
      Darryl K. Taft covers the development tools and developer-related issues beat from his office in Baltimore. He has more than 10 years of experience in the business and is always looking for the next scoop. Taft is a member of the Association for Computing Machinery (ACM) and was named 'one of the most active middleware reporters in the world' by The Middleware Co. He also has his own card in the 'Who's Who in Enterprise Java' deck.

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      Get the Free Newsletter!

      Subscribe to Daily Tech Insider for top news, trends & analysis

      MOST POPULAR ARTICLES

      Artificial Intelligence

      9 Best AI 3D Generators You Need...

      Sam Rinko - June 25, 2024 0
      AI 3D Generators are powerful tools for many different industries. Discover the best AI 3D Generators, and learn which is best for your specific use case.
      Read more
      Cloud

      RingCentral Expands Its Collaboration Platform

      Zeus Kerravala - November 22, 2023 0
      RingCentral adds AI-enabled contact center and hybrid event products to its suite of collaboration services.
      Read more
      Artificial Intelligence

      8 Best AI Data Analytics Software &...

      Aminu Abdullahi - January 18, 2024 0
      Learn the top AI data analytics software to use. Compare AI data analytics solutions & features to make the best choice for your business.
      Read more
      Latest News

      Zeus Kerravala on Networking: Multicloud, 5G, and...

      James Maguire - December 16, 2022 0
      I spoke with Zeus Kerravala, industry analyst at ZK Research, about the rapid changes in enterprise networking, as tech advances and digital transformation prompt...
      Read more
      Video

      Datadog President Amit Agarwal on Trends in...

      James Maguire - November 11, 2022 0
      I spoke with Amit Agarwal, President of Datadog, about infrastructure observability, from current trends to key challenges to the future of this rapidly growing...
      Read more
      Logo

      eWeek has the latest technology news and analysis, buying guides, and product reviews for IT professionals and technology buyers. The site’s focus is on innovative solutions and covering in-depth technical content. eWeek stays on the cutting edge of technology news and IT trends through interviews and expert analysis. Gain insight from top innovators and thought leaders in the fields of IT, business, enterprise software, startups, and more.

      Facebook
      Linkedin
      RSS
      Twitter
      Youtube

      Advertisers

      Advertise with TechnologyAdvice on eWeek and our other IT-focused platforms.

      Advertise with Us

      Menu

      • About eWeek
      • Subscribe to our Newsletter
      • Latest News

      Our Brands

      • Privacy Policy
      • Terms
      • About
      • Contact
      • Advertise
      • Sitemap
      • California – Do Not Sell My Information

      Property of TechnologyAdvice.
      © 2024 TechnologyAdvice. All Rights Reserved

      Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

      ×