TechEd NA 2014 – Native Mobile Application Development using Xamarin

TechEd North America 2014, Houston
Native Mobile Application Development for iOS, Android, and Windows in C# and Visual Studio Using Xamarin – Anuj Bhatia

Day 2, 13 May 2014, 5:00PM-6:15PM (DEV-B221)

Disclaimer: This post contains my own thoughts and notes based on attending TechEd North America 2014 presentations. Some content maps directly to what was originally presented. Other content is paraphrased or represents my own thoughts and opinions and should not be construed as reflecting the opinion of either Microsoft, the presenters or the speakers.

Executive Summary—Sean’s takeaways

  • The case for native apps built using Xamarin
    • Native UI for rich experience
    • Native performance
    • C# on the client, leverage existing .NET skills
    • Huge % of shared code across platforms
  • Working directly in Visual Studio
  • Universal Apps – single solution, cross platform
  • Sharing code with either Shared Source or Portable Class Libraries
  • Component Store – lots of 3rd party components, easy one-click install/use
  • Xamarin Test Cloud – test simultaneously on hundreds of devices

Full video

Anuj Bhatia – Enterprise Account Manager, Xamarin

Premise of Xamarin story

  • How do we turn you (Microsoft dev) into a mobile developer?

People Expect Great Experiences

  • First experience for people are things like Facebook and Twitter—great experiences
  • Attention to detail

What’s Driving Mobile?

  • Engagement on mobile devices—how are they engaged?
    • 86% apps / 14% browser
    • We’ve come to expect great experiences

Facebook HTML5 app (hybrid)

  • Horrible ratings in app store for HTML version

Facebook then did true native app

  • Clearly a better experience for everybody (judging from the app store ratings)
  • Meeting (or exceeding) people’s expectations

Xamarin growth – 600,000 registered developers

  • Lots of enterprise customers

Xamarin Studio + Visual Studio

  • Build native apps on iOS, Android using C#
  • Reach 2.6 Billion devices
  • Build fully native apps
  • Go mobile overnight—leverage existing skillsets, e.g. .NET, C#
  • Accelerate development—code sharing, component store
  • Component Store—easy to add functionality
  • Securely connect enterprise data—easy to connect to back-end systems

Could do “Write Once, Run Anywhere” approach

  • Lowest common denominator
  • Not good for scaling

How Xamarin Works

  • Native UI
  • Native performance

C#, Native Apps, No Compromises

Demo – Build Native iOS App with C#


  • Running sample app on iOS
  • Some simple animations: slow zoom on image, and Add to Basket animation
  • Mac with Build Host connection to PC
  • F# build scripts
  • Shared source project (i.e. for universal app)
    • Back-end services connecting to Azure
    • Extension methods
    • Models – huge benefit, not having to rewrite code
    • Authentication client
  • Authentication
    • Oauth2Authenticator – from Xamarin?
    • Automatically shows login screen
  • Filling out form, then “Place Order” click


  • Using Azure Mobile Service client service library

Native UI

  • Designer in Visual Studio
  • Add from Toolbox

Sharing Code Across Platforms

Universal Apps

  • Universal Apps
    • Easily share code between platforms
    • VS 2013 in beta
    • Soon – Xamarin Studio on Mac
  • Shared Source

Portable Class Libraries

  • Pure PCL
    • Limits expressiveness, but easy to build
    • Requires interfaces/plugs to work properly
    • Vs. shared source
  • Can pick targets – just platforms that you want
  • Xamarin moving entirely to PCL
    • Profile 78 is favorite
    • System.Drawing, moving to new platforms
    • In progress

Component Store

  • >150 components
  • Click on component, add to App, package managed for you, everything automatic
  • Charting controls, et al

Xamarin Test Cloud

  • Developers end up testing apps for mobile
  • Find bugs before your users do
    • Start immediately
    • Hundreds of devices – target hundreds of real devices (like Azure, for smartphones)
    • Continuous integration – integrate with your ALM (e.g. TFS)
    • Beautiful reports – great visual reporting
    • Test for fragmentation –
    • Object-based UI testing – test entire app, from UI down, using object-level UI testing
      • Don’t hard-code screen coordinates !
      • Too many device geometries

Automatically test device on hundreds of mobile devices

The Ideal Automated UI Testing Solution

  • Maximum market coverage with lowest coverage
  • Tests on real devices – from UI down
  • Resilient to UI changes
  • Continuous integration processes
  • Beautiful dashboards and detailed analytics

Real devices

  • Same as end users—no jail-breaking
  • Test from UI down
    • User interactions
    • Bugs & Crashes
    • Memory & performance

Resilient to UI Changes

  • Object-level user interface testing
  • Tests adapt as user interface changes

Support for continuous integration

  • Run tests directly from TFS, for example

Beautiful Xamarin Test Cloud UI

  • Cloud environment to allow testing on multiple real devices
  • Step through test code

Rdio demo

  • Simultaneously see app running on multiple devices—all on one screen
  • This is amazing

Xamarin University

  • Live delivery

Xamarin Certifications

  • iOS, Android, and Cross

Leave a Reply

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

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

Facebook photo

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

Connecting to %s