Monday
Jun022014

My findings after day 1 with Xamarin Forms

Xamarin Forms

I couldn't reist any longer. I dove in. Full on. Mac Mini, Galaxy S5, iPad Air. Got it all set up in my hotel room awaiting the comencement of the awesomeness that is the Norwegian Developer's Conference. Here's what I found after my first day.

First of all, Xamarin Forms is the latest abstraction from Xamarin that lets you build a solution in Visual Studio with projects for iOS, Android, and Windows Phone all sharing a single UI layer which you can build in XAML and C#. Kind of.

XAML and not XAML

The XAML you know and love is in there somewhere, but it's not all there. Xamarin has it's own controls with its own properties and bindings, and for obvious reasons. Still, it's XAML and XAML is awesome.

No Intellisense

Unless I'm missing something, the XAML editor has no intellisense, so that brings you back to the dark ages a bit. Please, someone tell me I'm wrong and that there's a tweak somewhere that I didn't find.

Shared Projects vs Portable Class Libraries

These are the two project types via which you can use Xamarin Forms. I chose to go down the Shared Projects rabbit hole. The main UI project doesn't compile an assembly. Each platform-specific project calls for the UI, which gets compiled to native code on that platform. Sweet, but there are some drawbacks.

No ValueConverters in Shared Projects?

I could not find a workaround to this one. Since ValueConverters are made accessible as local resources, and local resources are dependent on assembly bindings, and Shared Projects do not produce assemblies, voila. Not supported. I looked for a hack for hours. No luck. The ugly workaround is to create bindable formatted string properties. A better workaround is to move your valueconverters to a PCL, or use a Portable project.

iOS doesn't like empty string fields when binding

For iOS, String Fields of Labels must be initialized to non-empty before bindings will work. I found this out by binding the Text property of a label to a string property of an object. While it worked in Android and Windows Phone, I had to initialize the bound property to some non-empty string value otherwise the binding wouldn’t work.

The Good News

Despite all that, I was able to make an app that displayed location data in real time on all three platforms in one day, setup to done. That would have never happened if I had to learn Objective C and Java.

Good job Xamarin.

 

 

 

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (86)

References allow you to track sources for this article, as well as articles that were written in response to this article.

Reader Comments (7)

Thanks for sharing you experience. I heard ahout this one on Hanselman's blog. Since you took the dive and got a Mac mini check out this new programming language from apple called swift. It looks rwally interesting.

http://techcrunch.com/2014/06/02/apple-launches-swift-a-new-programming-language-for-writing-ios-and-os-x-apps/
https://developer.apple.com/swift/

I would also recommend checking out the demo on Youtube.

Seems like Apple is finally starting to get the message that developers experience matters.

Cheers,

Jason Wyglendowski

June 3, 2014 | Unregistered CommenterJason Wyglendowski

Just say one for your post. Amazing!!

December 16, 2014 | Unregistered CommenterLogo Designing Dubai

Your work is appreciable. It will be good if you will write on General Knowledge topics of UPSC exam.
competitive exam guide India

May 10, 2015 | Unregistered Commentergaurav pingale

We Buy Houses Charlotte NC

And do our presentation on Ipad minis!

August 25, 2015 | Unregistered CommenterAshley

We Buy Houses Fast!

August 25, 2015 | Unregistered CommenterJames

We Buy Houses Los Angeles

August 25, 2015 | Unregistered CommenterAshleigh

We Buy Houses Washington DC

August 25, 2015 | Unregistered CommenterJamie
Comments for this entry have been disabled. Additional comments may not be added to this entry at this time.
« Prepare your Mac for use with Xamarin iOS. | Main | Simplifying Kinect for Windows 1.x Skeleton Drawing »