Xamarin is a framework for cross-platform mobile app development in C#. The way it works is simple – you write one shared C# codebase with full access to all SDK possibilities and native UI creation mechanisms, and the result you get is a mobile app that looks and feels completely native.
Then the whole thing is packed into a container that looks like a native app. The disadvantages of this type of apps are pretty obvious. Number one, you don’t have access to native UI elements.
Number two, you get a cut and generalized API, therefore, some features peculiar to one platform or another will be unavailable. Number three, such app physically runs inside the phone web browser (WebView controller to be more precise). And you know what that means: the app runs slowly and looks ugly.
Xamarin is different. It is based on an open-source implementation of .NET called Mono. This implementation includes its own C# compiler, development environment and main .NET libraries.
There is a key difference between iOS and Android when it comes to apps performance – it’s their preliminary compilation. On Android devices virtual Java machine Dalvik is used to run the apps.
Native apps written in Java are pre-compiled into bytecode, which Dalvik then interprets into commands for processor when the program is running.
This is so called Just-in-time compilation. The compilation on iOS devices is called Ahead-of-time compilation. Xamarin takes care of this difference and provides individual compilers for each platform, so you get a completely native app as a result.
Xamarin allows using native UI development mechanisms and native UI elements for each platform, which doesn’t really go along with the Xamarin creators’ claims that it is an instrument for cross-platform development (an app written once will run on different mobile platforms).
Here is an explanation. The only layer that you’ll have to write specifically for each platform is the UI layer. That’s the price you pay for being able to use native UI creation mechanisms.
Xamarin has its own store with third-party components – Xamarin Components. It is integrated in the IDE and it allows adding different components, written by Xamarin experts as well as third-party developers.
You’ll have to pay for some of them, but the majority of the components are free. Not all elements are cross-platform though, many of them are available only for a specific platform.
Xamarin technology is currently a serious instrument for solving difficult tasks in the domain of mobile app development. The team of Xamarin developers never stop working on improving the framework. The technology looks very promising, as the number of developers choosing to develop with Xamarin are increasing every day.
You can download the framework on the official website – www.xamarin.com.