Xamarin: Initial Thoughts

.NET

Xamarin: Initial Thoughts

If you been reading my blog for a while now, you probably know that I primarily make apps for the iPhone using Swift and Xcode.

However, Recently I have been asked if I could make an Android version of an app I created for my clients business. Up until this point, I would have said no due to the fact I only focus on the iOS platform, until now. I’ve heard a lot of positive reviews on a technology called Xamarin. For those that don’t know, Xamarin is a technology that allows you to create cross-platform mobile apps using C# and the .NET Framework. I was really excited when I heard about this because I could use my C# and .NET skills, to write apps for the iPhone and Android. I quickly downloaded the necessary updates to Visual Studio for Mac and got started. Here are some initial thoughts that I came up with after using the platform for a couple of days.

The Android SDK is Complicated:

I admit I do not have any Android app development experience so some of my thoughts may sound obvious. When I was updating Visual Studio it prompted me to download the latest Android SDK. However, upon completion, I was still missing some required components. For starters, I could build an app in Visual Studio but I could not run the app because I was missing an Intel HAXM driver. This driver is used to speed up an Android Device Emulator for testing purposes. I did try to use the non-accelerated emulator but it was way to slow. Once that was installed I thought I was good to go. I’m also using a Nexus 6 as a development device. It turns out, in order to deploy apps to real devices. I needed to download another version of the Android SDK. So yet again I went back to downloading components just to run a sample app.

 Xamarin Forms:

I like Xamarin Forms, it allows you to create an interface that works on both platforms using native controls. It uses XAML to script out the interface and give actions to elements similar to ASP.NET web forms. I was immediately familiar with this concept. However, I miss the easy drag and drop ability of Interface Builder that is in Xcode. It’s not a huge deal breaker for me, but I hope its added in the future. However, for some reason, the preview pane did not want to work for me. I kept getting an exception when trying to preview my app at design time. Hopefully, this is some kind of bug that can be fixed in a software update.

 

Layouts

Xamarin uses layouts to place elements on the screen since it does not have the same capabilities as Interface Builder. However, I was there was some better guidance on what layout to use. During my testing, I found that the StackLayout was similar to what is found on iOS. I’ll definitely be doing some research on this to educate myself accordingly. If anyone has any good resources in this area, please leave them in the comments section or send them to me on Twitter.

 

Overall I like Xamarin so far and I can definitely see myself using it more once the initial learning curve is done

dcadmin

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: