Xamarin – An Introduction

 

Xamarin - An IntroductionThis Cross-Platform development tool is slowly capturing everyone’s attention and rightly so. Made for cross platform/ hybrid developers, Xamarin solves the issue of separate coding languages and UI paradigms to a great extent. With a common programming language like C# for developing apps for iOS, Android and Windows, this technology comes with its own set of elements that make the job easier for developers. In addition to all of this, Xamarin forms takes care of interface design for all three platforms. Let’s have a slightly deeper look into Xamarin’s main parts.

The main element of Xamarin is the coding language it endorses, C#.  This is an obvious advantage. Using a code base in one language improves code efficiency as well as improves dev time. Another major advantage is using familiar syntax and sophisticated features like Generics, LINQ and the Parallel Task Library.

Next in line is the Mono .NET framework. For those of you who are not sure what a Mono platform is, here is the textbook definition – Mono is a software platform designed to allow developers to easily create cross platform applications part of the .NET Foundation. Sponsored by Microsoft, Mono is an open source implementation of Microsoft’s .NET Framework based on the ECMA standards for C# and the Common Language Runtime.

Then comes the important element – The Compiler. This works differently for different platforms. As far as iOS and Android goes, the unused classes are stripped off during linking to reduce the App size. So, apart from that part, here is how it works differently. For iOS, C# is ahead-of-time (AOT) compiled to ARM assembly language. But there are limitations for iOS, as Apple does not allow runtime code generation on iOS.

For Android, C# is compiled to Intermediate Language and packaged with a combination of Mono VM and JIT. The application runs side-by-side with Java/ART (Android runtime) and interacts with the native types through JNI.

Alternatively, it becomes easier for Windows Apps to be used for iOS and Android platforms if Xamarin’s guidance is followed. For Windows, C# is compiled to IL and executed by the built-in runtime, and does not require Xamarin tools.

Xamarin is a wide field, with various nitty gritties that will help enhance cross platform development. While this article just touches upon the tip of the iceberg, we will delve more into Xamarin in the future.

 

Leave a Reply

Your email address will not be published. Required fields are marked *