Missed it by that much…: Xamarin and cross-platform

For those working with apps, one of the major concerns is which platform to target. For me, I simply prefer C# as a language and Windows Phone as an OS. However, being everywhere is sometimes a concern, especially if your app needs to generate revenues.

For that, you have to write independent apps with separate code bases, or select a cross-platform solution. I can’t justify separate code bases most of the time, as it means maintaining a lot of code, having partners or a deep knowledge of multiple languages and infrastructures, and is simply a great deal of work.

That brings us to cross-platform. Now, as I mentioned before, and you likely know if you’ve read the rest of this blog, I’m a C# guy. Added to this, JavaScript gives me conniptions. I’m just not sold on the language for app development and I find that the cross-platform solutions that use it make too many compromises.

As a result, I’ve been learning Xamarin. Specifically, I’ve decided to focus on Xamarin.Forms rather than vanilla. Why? Xamarin uses C# and Xamarin.Forms gives me the ability to do all my UI/UX in XAML. I, quite frankly, love XAML. Additionally, I can still make platform specific code and pages in Xamarin.Forms for those times when cross-platform simply won’t work.

All kinds of pros, no real cons? Yes please!

Well, after using it for a while, there are a few cons. Some of them are baked into Xamarin and won’t be leaving anytime soon, while others are (slowly) being addressed.

One thing that has me shaking my head a fair bit is that Xamarin tends to mix Android and iOS design philosophy rather than using Windows and C#. Some of this is simple, like using Labels rather than TextBlocks. However, sometimes it crops up in a focus on the other platforms, like using Tabs rather than Panels. The issue is that little of the Android and iOS documentation translates, while using the Windows conventions would have meant most of that documentation would be applicable (as you’re already using XAML).

Additionally, rather than handling platform differences in the SDK, it’s often left to the dev/designer to handle in their own code (I’m looking at you, layout renderers). For me, the whole point of the SDK is to handle this stuff so I can avoid implementing different handling code.

That said, even in the time I’ve been using it, Xamarin is improving. It’s going slow, but things are happening. I just don’t know how fully cooked it is. And, despite all the issues, digging through forums and blogs, and general swearing, I’m still using it and (mostly) liking what I see.

Now I need to get back to building a few custom Xamarin controls…

This entry was posted in .NET, C#, Xamarin, Xamarin.Forms, XAML and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s