Week Two: A Microsoft Developer’s Introduction to Xamarin and Cross-Platform Development

In week 1 I mentioned that Xamarin Studio on Windows was not great. Fortunately, as I’ve been working more with it, Visual Studio is a more than competent alternative. Additionally (and I have been waiting for/predicting this for some time now), Microsoft’s intent to purchase Xamarin has been announced. I think this is fantastic news.

I’d guess that Xamarin licensing will roll into MSDN subscriptions and Xamarin developers will likely be given discounted MSDN subscription options but we shall see. The marketing/transition folks will end up taking care of that over the next year or so. It should be a fun ride.

Onto real development:

I didn’t get much time to actually work on the scaffolding for my first application but what time I did get was significantly enhanced by reading through Jonathan Yates‘ page, Adventures in Xamarin Forms. The articles, along with the accompanying source code for the Mountain Weather application are well written and helped me get going more quickly. I have a history developing WPF applications. This helped me start to feel that I wasn’t entering into an alien environment while developing a Xamarin.Forms style application.

All that being said, here is the list of scaffolding tasks (in no particular order) that I wanted to accomplish to 1) feel comfortable with the platform, and 2) have knowledge of before actually trying to develop operational (versus technical) business value:

Set up Solution to maximize Code Re-Use From Week 1 – My preference is to use the “Blank App (Xamarin Forms Portable)” template
Implement IoC Container I really liked how Jonathan Yates implemented this in his Mountain Weather application
Add Application Localization This was pretty easy and familiar with how I’ve done things in WPF applicaitons in the past. There is a good article to follow if you haven’t done this before, but I didn’t find it all that necessary.
Set up MVVM Infrastructure I desire my applications to be testable. Coming from the WPF background, I’m familiar with the MVVM pattern and, because the Xamarin.Forms applications are Xaml-based, this was a natural fit. Again, the Mountain Weather application was helpful with getting this implemented.
Set up solution for Unit and UI Testing This is still coming (maybe even as early as today) but there are enough samples to follow. I don’t foresee this being problematic.
Set up Continuous Integration This one kinda irks me. You’re kind of painted into a corner here because of the “Apple problem” – To build iOS applications, they must be compiled on Apple hardware. Also, you have to be a registered Apple developer. This has two problems: 1) We don’t have an OSX machine in-house yet so I don’t know of a way around setting up a build machine until after we purchase one. I’m trying to put off committing to Apple purchases for as long as possible. 2) To become an Apple developer, you have to not only pay your money but, if you are a company wanting to develop application, you have to apply for a “D-U-N-S” (I don’t think it’s coincidental that this could be pronounced “dunce”) number. This is a number given to you by an “Apple Approved” business registry. We emailed away for this a week ago. It’s said that this takes up to a week. It’s free, but forcing people to subscribe to this particular US business registry is just another of those “prescriptive” things that gets under a person’s skin.
Set up Application Updating After they are deployed, I’d like to be able to have my applications update themselves. There is a Xamarin article on how to do this. I don’t know a lot of this process so I’d like to understand it and have it working. There are two separate processes: one for iOS and one for Android.
Set up application to support UI Themes I support a number of companies with the applications that I build. Though each application has the same heart, the look of each is often branded to fit each individual company. I came across an article entitled, Xamarin: Skinning an app for different clients using Appearance and themes from Andrew Ross that I intend to use as a starting point for implementation of implementing a different theme for each company.
Set up solution for Unit and UI Testing This is still coming (maybe even as early as today) but there are enough samples to follow. I don’t foresee this being problematic.
Mobile Sync I don’t expect my application to live in an “always connected” state. The data being entered should be able to be synced back to mothership once a reliable connection has been established. I have found a number of articles that I intend to use to help get me started here:

Support Push Notifications As was the case with application updating, the process for this appears to be different between iOs and Android.
Application Authentication/Identity I’m not completely sure how this one will go. I have the scenario where I would like the same authentication experience for both our AD users as well as our external clients. I’d like whatever process that is used here to support multi-factor authentication as well as self-serve account maintenance. I am leaning toward leaning on Azure Mobile Services again here where, again, it seems there may be a difference in how to handle this in iOS versus Android.

That’s all for this week.


5 thoughts on “Week Two: A Microsoft Developer’s Introduction to Xamarin and Cross-Platform Development

  1. […] Week Two: A Microsoft Developer’s Introduction to Xamarin and Cross-Platform Development – Jason Hunt continues his series on cross platform development, highlighting a number of resources to get up and running with a Xamarin development project. […]

  2. […] from the task list I put together in  Week Two: A Microsoft Developer’s Introduction to Xamarin and Cross-Platform Development, I was able to accomplish the Push Notifications and Unit/UI Testing tasks. I was also able to get […]

  3. nhwilly1011

    Hey, thanks for this. I am just getting started with Xamarin and I’m tired of Hello World apps. I, too, do not have a Mac for the same reasons. I don’t want to buy one for my solo developer excursions, but I know I’ll have to eventually. I just worry that this is a brittle house of cards. Very relieved that MS bought these guys. Hate to spend thousands only to find out it’s impossible to work with.

    • I understand that you can use a Mac Mini as your build server. They’re the least expensive option (~$500USD right now iirc) I’m keeping my eye on the used scene to try and get one even cheaper.

      The whole iOS development side of things frustrates me. As a business you have to register with the “Apple Approved” business registry. Wait for them to give you a D-U-N-S number, then pay Apple for the right to enhance their platform’s adoption by adding apps that work on it. Seems backward, time consuming, and monolithic IMO. If I were in your shoes, building apps for personal and not business, I’d very easily have decided iOS be damned and simply develop for Android and Windows Phone.

  4. […] me. I didn’t get much, or much consecutive, time to work on achieving the goals laid out in Week 2. The VPs of the companies I support were preparing for meetings that often require some analytics […]

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s