Looking back on Xamarin Evolve 2014

Xamarin’s Evolve 2014 conference was a great experience.  I attended it last week in Atlanta and while you see a lot of the cool new features from the live stream, the personal interactions made attending much more valuable.

Xamarin is much more focused on the enterprise customer.  They have picked up a bunch of new partners (Microsoft, IBM, etc) and companies like Amazon are focusing on Xamarin developers.  The 3rd party component vendors are coming out with component packs for Xamarin.Forms.  If your app needs a charting control, you have a wide range of commercial products to choose from now.

Xamarin.Forms has become a huge hit with developers.  Many of the training and conference sessions were focused on Xamarin.Forms.  If you are looking at Cordova for cross-platform projects, you should take a closer look at Xamarin.Forms.

A big reason to attend conferences like Evolve is to meet and share experiences with other developers and Xamarin staff.  Xamarin does a  really good job of having their people mingle with the users. Many of them were Xamarin users before becoming hired so they have a good understanding of what it’s like to use their software.

Keynote Highlights

Xamarin Android Player

During the keynote, Miguel de Icaza launched the Google Android Emulator.   While it was loading, he went on a long and funny rant about how it was.   At the end of the rant, he presented the Xamarin Android Player, their own emulator that uses hardware virtualization to run as fast (or faster) as an actual Android device.

Xamarin Android Player on OS X

Xamarin Android Player on OS X

The Android Player is similar to the Genymotion Player, and on Windows they both use Oracle’s VirtualBox virtualization product to host the Android images.  If you have used Genymotion, then this will feel familiar.  While everyone uses the personal license for Genymotion, it does require a paid license for commercial use. The Android Player will be free to Xamarin customers.

Android Player is a developer preview release and only has a couple of Android images currently available: Nexus 4 with KitKat and Nexus 5 with Jellybean.  It’s not clear on how you would add Google Play support, that is not in the downloadable images.  If you do anything

Xamarin.Insights

James Montemagno and Nat Friedman with Xamarin Insights

Introduced Xamarin.Insights, which provide real-time monitoring for Xamarin Apps. You can record every crash that happens and access that data from an online dashboard.  Users can opt in to share their contact information.  This gives you the ability to contact users to let them know when a bug that affected them has been fixed. From their blog:

You can add Insights into your application with just a single line of code. Insights will gather and report any uncaught native or managed exceptions. In addition, you will be able to track both past and active sessions, with full access to device statistics such as operating system and screen resolution. If you want a deeper level of control, you can simply “report” any caught exception, along with any additional data that will help you diagnose the issue, using Insights’ simple API.

Xamarin Profiler

Also in beta is the new Xamarin Profiler for iOS and Android.  The Xamarin Profiler will track memory and performance.  It will show you where in the code your application is spending the most amount of time and how much memory is being used over time.  The profiler will work with both Xamarin Studio and with Visual Studio.  This makes for a nice addition to the developers toolkit.

Xamarin Sketches

Xamarin CTO Miguel de Icaza using Sketches

Now you have the ability to play with the code in real time with Xamarin Sketches.  You can write code and see it execute as you write it.  It’s a handy way to test some snippets of code without having to go through the entire build cycle.  It’s kind of like LINQPad for, but works with OS X, iOS, and Android UI elements.

Xamarin.UITest

Based on the Calabash technology that is in Xamarin Test Cloud, we can now unit the UI with Xamarin.UITest,  You can write up test scripts in C# to simulate the user pressing buttons and entering text into the application.  UITest provides a REPL interface to allow you to interactively query the UI. This is useful for determining the name of the controls to reference in your scripts.

You can run the scripts locally and deploy them to test cloud.  UITest with Nunit allows the developer to set up unit tests for the UI and for the code behind the UI.

Xamarin Insights

Xamarin CTO Miguel de Icaza demoing the new profile

We now have the ability to add real time monitoring of our apps via Xamarin Insights.  You can record every crash that happens and access that data from an online dashboard.  Users can opt in to share their contact information.  That gives you the ability to contact users to let them know when a bug that affected them has been fixed.

And we also learned the proper pronunciation of “PCL” and “nuget”, courtesy of Miguel de Icaza:

It's pronounced as Pickles and Newjay

Xamarin CTO Miguel de Icaza during the Evolve Keynote

And then they added Xamarin support to the Multilingual App Toolkit

As of 6am EDT today, Microsoft’s Multilingual App Toolkit officially supports Xamarin for making it easy to manage language translations in mobile apps. Originally designed for Windows Store apps, the Multilingual App Toolkit (which I’m just going to call MAT) allows you to add new language resources and generate RESX files to compile into your app. It uses the XLIFF format for storing the translated resources and can import, export, and even machine translate your native text into other languages.

XLIFF stands for Xml Language Interchange File Format and is an industry standard file format that language translation companies can use to translate your text. XLIFF has some rudimentary workflow features that you track when a new text string has been added, or translated, or approved.

Prior to version 4, MAT only knew how to generate RESX files. That’s fine for Windows apps, but Android and iOS have their own formats. Android uses XML files in the folders for each language or local. The format is similar to the RESX format. For iOS, they store the string resources in text files, as key value pairs.

Last fall, I played around with that version and used T4 templates to render Android and iOS native resource files from the Windows RESX files. The MAT team decided to add that capability into MAT and improve on it. You can now add MAT support directly to Xamarin.Android and Xamarin.iOS projects. If you enable MAT support for Android, you can right on an Android project and add new languages to the project. They will be XLIFF files and will generate Android strings.xml files for each language.

Microsoft’s Cameron Lerum has been working on MAT and has brought it with him to Xamarin’s Evolve conference. I’ve had early access to beta builds of MAT 4 and it works much better than my mess of T4 scripts.

Microsoft’s Cameron Lerum demoing the Multilingual App Toolkit with Xamarin.iOS for Xamarin CTO Miguel de Icaza

The latest thing from Xamarin has been Xamarin.Forms, which allows you to write common UI code for Android, iOS, and Windows Phone. MAT v4 works just fine with it. Put your string resources in a RESX file and put that file in a shared library. Then you can access the compiled resource strings from both the code behind and in the XAML markup. You’ll need to add an IMarkupExtension to your project, but that will give you databinding to the localized string resources.

To find out more about the new version of the Multilingual App Toolkit, Cameron just posted an article on it on the MAT blog.  If you are attending the Xamarin Evolve conference this week, look for Cameron or myself and we can demo the new version.  If you are in Atlanta on this Saturday, the 11th, I will be doing a presentation at the Atlanta Code Camp that will feature how to use MAT to add localization support to native mobile apps.