I have spoken with many people about Xamarin and there is one common denominator among all the conversations. It seems like no one knows what it is – even if they have heard of it. Somehow people know that it’s cool and it might be a good idea – but still so many people are making native apps from the ground up in Android, iOS and mostly not bothering with Windows Phone. Why not though? If you could write an app for all three platforms with the same amount of effort, wouldn’t you? Read on you mobile connoisseur you!
It seems there is a new mobile framework popping up every other day. From Cordova to Telerik’s “Platform”, and a ton of other “easy” mobile app platforms. Xamarin is not one of these as in it’s not a strictly hybrid app creation tool (though it does support hybrid apps), and it’s not a simple WYSIWYG “builder” either.
Xamarin is a platform created on the Mono framework by a company in San Francisco (since acquired by Microsoft) that allows dot net developers to create fully NATIVE mobile apps. Yes, that’s right, I said Native. As in Xamarin compiles the code you write in C# (using the Mono framework) to the corresponding libraries for Android and iOS platforms. This allows Developers/Programmers/Engineers/Coders (what are we even calling ourselves anymore?) to write fully managed C# code with 90% code reuse. Not only can we write the C# code we can do it in Visual Studio IDE that we all know and love (we actually have no other real options though, do we?).
90% Code reuse! So that means I can write functions, algorithms, UI and not have to rewrite it all over again in the other platforms? Yes! Now, I suppose you’re wondering about the other 10%.
It does manage to do most of what iOS and Android can do on their own. With a few exceptions for specific uses – it manages to make use of all the standard GPS, image, file, camera, sensor libraries you might want that’s available from Android and iOS out of the box. Something specific that it has never managed to do is Video – as in playing video. Recording video, no problem, however, playback seems to be something so platform specific that Xamarin has not managed it.
The single greatest thing about Xamarin is also the best place to start. Xamarin Forms is a set of cross-platform UI tools that allows developers to quickly create a native interface for all the platforms. Creating UI that looks like iOS, Android, and Windows, as simple as dropping the component in. This allows you to focus on your API layer and your model binding/data synchronization. What was that? Are you interested in the model binding? Xamarin does allow 2-way model binding the same way that you would set up binding to Windows forms controls.
I would suggest the minute you install Xamarin (in Visual Studio) and create a new project – just click the Xamarin Forms app template =).
Don’t write the same app multiple times. You don’t have to, and you shouldn’t. Use Xamarin.