Tuesday 24 April 2012

Create amazing Android iPhone and iPad apps with C# and .NET

Create amazing Android, iPhone and iPad apps with C# and .NET







Create Great Apps Fast

MonoTouch and Mono for Android make it easy for .NET developers to dive right into mobile development.
Overview
When considering how to build Android applications, many people think that Java is the only choice. However, over the past few years, an entire new ecosystem of platforms for building Android applications has emerged. These new solutions include Mono for Android,AppCelerator, PhoneGap, etc., just to name a few.

Each of these platforms has a different feature set and each varies in its ability to write native applications – that is, applications that compile down to native code and that interop fluently with the underlying Java subsystem. For example, some platforms only allow you to build apps in HTML and JavaScript (such as AppCelerator), whereas some are very low-level and only allow C/C++ code. Some platforms (such as Flash) don’t even utilize the native control toolkit.
Mono for Android is unique in that it combines all of the power of Java and adds a number of powerful features of its own, including:
  • Complete Binding for Android Java API – Mono for Android contains bindings for nearly the entire ADK. Additionally, these bindings are strongly-typed, which means that they’re easy to navigate and use, and provide robust compile-time type checking and autocomplete during development. This leads to fewer runtime errors and higher quality applications.
  • Java and C/C++ Interop – Mono for Android provides facilities for directly invoking Java, C, and C++ libraries, giving you the power to use a wide array of 3rd party code that has already been created. This lets you take advantage of existing Android libraries written in Java or C/C++.
  • Modern Language Constructs – Mono for Android applications are written in C#, a modern language that includes significant improvements over Java such as Dynamic Language FeaturesFunctional Constructs such as LambdasLINQ, Parallel Programming features, sophisticated Generics, and more.
  • .NET Base Class Library (BCL) – Mono for Android applications uses the .NET BCL, a massive collection of classes that have comprehensive and streamlined features such as powerful XML, Database, Serialization, IO, String, and Networking support, just to name a few. Additionally, existing C# code can be compiled against Mono for Android for use in your applications, which provides access to thousands upon thousands of libraries that will let you do things that aren’t already covered in the BCL.
  • Modern Integrated Development Environment (IDE) – Mono for Android uses MonoDevelop on Mac OSX, and also MonoDevelop or Visual Studio 2010 on Windows. These are both modern IDE’s that include features such as code auto completion, a sophisticated Project and Solution management system, a comprehensive project template library, integrated source control, and many others.
  • Mobile Cross Platform Support – Mono for Android is a sibling to MonoTouch, which allows C# applications to be written for the Android platform. MonoTouch and Mono for Android allow iOS and Android applications to be written that share common backend application code. Additionally, because both Mono for Android and MonoTouch utilize C# and the .NET BCL, the same application code can be shared with Windows Mobile 7 applications as well! This can significantly reduce both development costs and time to market for mobile developers that target the three most popular mobile platforms.
Because of Mono for Android’s powerful and comprehensive feature set, it fills a void for application developers that want to use a modern language and platform to develop cross-platform mobile applications.
Let’s dig into Mono for Android a bit to examine how it works.

How Does Mono for Android Work?

Mono for Android is a commercial product built on top of Mono, which is an open-source version of the .NET Framework based on the published .NET ECMA standards. Mono has been around nearly as long as the .NET framework itself, and runs on nearly every imaginable platform including Linux, UNIX, FreeBSD, Mac OSX, and others.
Mono for Android was originally created by Novell and released in 2011; however, just after its release, most of the Mono (and Mono for Android) team formed a new company (Xamarin) as part of Novell’s restructuring. Novell then granted Xamarin a perpetual license to all things Mono and handed the Mono for Android reins over to Xamarin, who supports and continues to develop new Mono for Android releases.
Mono for Android allows you to use C# and the .NET Base Class Library (BCL) to write native Android applications. This is accomplished by executing applications in an instance of the Mono runtime VM, which co-exists on devices along with Google’s Dalvik VM. When a Mono for Android application is built, three main steps occur:
  • Resource Generation – As a pre-build step, aresgen.exe is run against a Resources directory in order to generate a Resources.designer.cs file containing Android resource identifiers. These resource identifiers are a key piece of Android applications and are used to locate images, UI files, strings, etc.
  • Compilation – C# code is compiled into a Managed .NET/Mono assembly.
  • Android Wrapper Creation – The mandroid.exe tool is run against the .NET assembly to generate Android-callable wrappers and generate an Android package.d development.


Create Great Apps Fast

MonoTouch and Mono for Android make it easy for .NET developers to dive right into mobile development.


Share Code Between Platforms

Save time by sharing data structures and non-UI code between iOS and Android.

Use Your Existing .NET Skills

Reuse your .NET skills and write code in your mobile apps using C# and familiar libraries.

Powerful and Modern Framework

Write code using a modern, strongly typed, garbage collected framework.



Easy Access To Native APIs

Access to thousands of native iOS and Android APIs.

Target Multiple Devices

Easily write apps that target iPhone, iPad, iPod Touch and Android devices.

Rich IDE Support

Full support for autocomplete in our rich IDE. Or use Visual Studio for Android development.

No comments:

Post a Comment