Mono for Android Components(Part 1)

             
    


Mono for Android (Part 1)

Components:
Mono is an open source project that provides a C# compiler and CLR on non-Windows operating
systems. Mono is currently licensed under GPL version 2, LGPL version 2, the MIT, and dual
licenses. Mono runs on Mac, Linux, BSD, and other operating systems. Along with the C# compiler,
additional languages run on Mono, including F#, Java, Scala, Basic, and others.

Mono, the brainchild of Miguel de Icaza, was officially announced in 2001. Version 1.0 shipped
in 2004, and currently, Mono is at version 2.10, though it is continually being upgraded and will
most likely be a later version by the time you read this. Currently, Mono has parity with many
of the features in .NET 4. Mono continues to be directly led by de Icaza. Recently, the stewardship
of Mono has passed to Xamarin. Xamarin leads the direction of Mono. Mono started as an
open source implementation of a C# compiler. It grew from this initial design into the current open
source implementation of .NET.

 It is now Xamarin’s responsibility to nurture Mono. Xamarin is
responsible for the development of Mono for Android, MonoTouch, and the software that makes
these products work for the developer. Given that Xamarin is laser-focused on Mono in the mobile
area, I think these products are in good hands.

As much as there is a desire to match the .NET Framework’s features, this is not possible because
Microsoft has more resources and a head start on the development of those features. At the same
time, the Mono project has parity with a large number of .NET Framework features. The best that
Xamarin will most likely accomplish is to be shortly behind the .NET Framework for most of the
APIs that are possible.

Along with Mono is the open source IDE called MonoDevelop, which started as a port of the
SharpDevelop IDE. MonoDevelop began as a project to allow for Mono development on Linux,
but with the release of MonoDevelop 2.2, the ability to develop with Mono expanded to the Mac,
Windows, and several other non-Linux UNIX platforms.
Although the .NET Framework is very popular, two issues make it unsuitable for running on Android:

 At some level, Google and Microsoft are competitors and are probably not too excited to
work together. Microsoft has had Windows Mobile devices for years, which compete directly
with Google’s Android operating system.
The .NET Framework fundamentally is a major competitor for the Java Virtual Machine that
is at the heart of an Android device. This Java VM is called Dalvik. The .NET Framework
and Java have been competitors since the initial announcements of the .NET Framework.

A disadvantage of .NET/Mono and Android is
that .NET/Mono developers cannot take them
.NET/Mono/C# knowledge and apply it to the
Android platform. Figure 1-1 shows this concept.
.NET/Mono developers can’t target Android
because they’re two separate entities.
In 2009, the Mono team announced and shipped
MonoTouch, the forerunner to Mono for Android.
MonoTouch allows developers familiar with C# to
target the Apple iPhone. Based on the experience of building MonoTouch, the Mono team learned
how to effectively and efficiently build a C#/Mono layer that sits on top of the device’s native application
programming interface (API).


                Mono for Android

In April 2010, Apple introduced fear, uncertainty, and doubt into the mobile development marketplace
by making changes to its software development kit (SDK) licensing. This change caused many
developers to question developing for the iPhone and iOS. At that point in time, the Mono team had
been experimenting with creating a Mono product for Android similar to its MonoTouch product.
Due to Apple’s SDK changes, the Mono team announced the Mono for Android product and put
significant resources behind it. Mono for Android shipped in the spring of 2011. While Apple
eventually rescinded their SDK issues, the 5 months during which MonoTouch sat in limbo allowed
the Mono team to put significant resources into developing Mono for Android. The result of this is
that Mono for Android is further along than it would have been if Apple had not put MonoTouch into
limbo for all those months in 2010.

Mono for Android allows .NET developers to create
native applications that run on Android. These
applications look and feel like native Java applications
running on Dalvik. With Mono for Android,
applications are compiled into executable code
that runs on Android devices. The significance
of this should not be understated: .NET/Mono
developers can target Android through Mono for

How does Mono for Android accomplish this? Does it somehow allow Windows Forms applications
to be translated or recompiled and deployed on Android? Mono for Android provides a .NET
layer over the native programming layer present on the Android OS. Developers targeting Dalvik
would write applications in Java. Mono for Android does not provide a mechanism to cross-compile
Windows Forms applications, but it allows developers to build applications that run natively
on Android.

Overall, the API exposed by Mono for Android is a combination of the .NET 4 Framework’s core
features, Silverlight APIs, and the native Dalvik Java VM. Mono for Android provides a bridge
(interop) layer between Android’s native APIs and the APIs that .NET and C# developers are
accustomed to.


Mono for Android Components(Part 1) Mono for Android Components(Part 1) Reviewed by Unknown on 10:47 PM Rating: 5

No comments:

Powered by Blogger.