Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

Embed Size (px)

Text of Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xamarin

  • Building Mobile Cross-Platform Apps foriOS, Android & Windows in C# with Xamarin

    Nick LandrySenior Technical Evangelist,

  • Session Agenda

  • Audience poll

  • Silo Approach:

    Build the Same Apps Multiple Times

  • The Siloed approach: Build native apps multiple timesMultiple teams and multiple code bases are expensive and slow




  • Write Once,Run AnywhereApproach

    Lowest Common Denominator

    Browser Fragmentation

    App Generation.

    Web Browser in a

    Native Wrapper +

    Platform APIs.

  • The write-once-run-anywhere approachHTML Hybrid scenarios (Semi-native apps) like Cordova (i.e. PhoneGap)

  • Xamarins Unique Approach

    Shared C# codebase 100% native API access High performance

    iOS C# UI Windows C# UIAndroid C# UI

    Shared C# Mobile C# Server



    Shared C# Client/Server

  • C# and Xamarins unique approachThe best of all worlds

  • How Does Xamarin Run C# on iOS or Android?

  • Windows APIs

    Microsoft.Phone Microsoft.Networking Windows.Storage Windows.Foundation Microsoft.Devices

    System.Data System.Windows System.Numerics System.Core System.ServiceModel

    System.Net System System.IO System.Linq System.Xml


  • iOS 100% API Coverage

    MapKit UIKit iBeacon CoreGraphics CoreMotion

    System.Data System.Windows System.Numerics System.Core System.ServiceModel

    System.Net System System.IO System.Linq System.Xml


  • Android 100% API Coverage

    Text-to-speech ActionBar Printing Framework Renderscript NFC

    System.Data System.Windows System.Numerics System.Core System.ServiceModel

    System.Net System System.IO System.Linq System.Xml


  • All 3 characteristics are required for a truly native app

    Xamarin is native in all 3 ways

    Native User Interface

    Apps are built with standard, native

    user interface controls for easy and

    familiar interactions

    Apps have access to the full spectrum of

    functionality exposed by the underlying

    platform and device

    Apps leverage platform-specific hardware

    acceleration, and are compiled as native

    binaries, not interpreted at runtime.

    High-fidelity API Access

    Native Performance

  • Xamarin exposes 100% of the native APIs

    for iOS, Android and Windows

  • Anything you can do in Objective-C or Java

    can be done in C# with Xamarin using Visual Studio

  • Native Performance

    Xamarin.iOS does full Ahead Of

    Time (AOT) compilation to

    produce an ARM binary for

    Apples App Store.

    Xamarin.Android takes advantage of

    Just In Time (JIT) compilation on the

    Android device.

  • Always Up-to-Date

    Full support for:Google Glass, Android Wear, Amazon Fire TV

  • Xamarin: How much?


  • Development Environment

    Xamarin Studio

    PC or Mac

    Visual Studio Plugin

    VS 2010/2012/2013/2015

  • Xamarin Studio

  • Xamarin + Xamarin.FormsWith Xamarin.Forms:

    more code-sharing, native controlsTraditional/Classic Xamarin approach

    Shared UI Code

  • Whats included

    40+ Pages, layouts, and controls

    (Build from code behind or XAML)

    Two-way data binding


    Animation API

    Dependency Service

    Messaging Center

    Shared C# App Backend

    (non-UI code)

    Shared UI Code

  • Native UI from shared code

    At runtime, each Xamarin.Forms page and its

    controls are mapped to platform-specific native

    user interface elements

    Use a single API to generate native, platform-specific user interfaces

  • Xamarin.Forms Pages

    Content MasterDetail Navigation Tabbed Carousel

    UIViewController Activity Page

  • Xamarin.Forms Layouts

    Stack Absolute Relative Grid ContentView ScrollView Frame

  • 40+ Xamarin.Forms Controls

    ActivityIndicator BoxView Button DatePicker Editor

    Entry Image Label ListView Map

    OpenGLView Picker ProgressBar SearchBar Slider

    Stepper TableView TimePicker WebView EntryCell

    ImageCell SwitchCell TextCell ViewCell

  • Shared Projects

  • NuGet

  • Portable Class Libraries

  • Choosing a Code Sharing Option

  • Native Dev: Platform Tools or Xamarin?

    Platform Tools (Windows, iOS, Android)

    Default native method to build apps

    Free development tools & SDKs

    Requires learning at least one language &

    SDK per platform (C#, Java, Objective-C)

    Design, develop & maintain completely

    separate apps for each platform

    More learning resources available

    Books, web sites, blogs, training,

    StackOverflow, videos, larger

    community, etc.

    Yet, iOS developers are (kinda) starting all

    over with Swift

    Xamarin / Mono

    Reuse existing C# skills & source code (but

    you have to know C#)

    Need to buy an additional tool: extra cost

    Need to learn new tools & techniques

    Still need to learn the specifics of each

    platform SDK, app architecture & lifecycle

    Fewer third-party libraries available

    Built-in GUI designer for iOS and Android

    Xamarin.Forms provides native shared Uis,

    but there is no XAML designer (yet)

    Vendor lock-in / dependency

  • Mobile Strategy Considerations


    General Consumer


    Niche Consumer


    Enterprise Users



    Marketing Checklist


    Brand Reach Apps

    Weekend Warrior Apps

    Apps for Profit

    Mobile Revolution


    Other Considerations

    Mobile Population

    Coverage Target &

    Desired Reach




  • Summary


    Session Demos


    Xamarin Videos for Developers


    Xamarin Resources

  • Xamarin Developer Certifications:Be part of an Elite Developer Community

    Students have the option to take a certification test and become Xamarin certified. Xamarin skills are increasingly in demand certifications let the market know you represent top talent.

  • Online Microsoft training delivered by experts to help technologists continually learn

    Hundreds of courses for developers, IT Pros, students, entrepreneurs and enthusiasts

    11 different languages

    More than 3M students registered

    Build your own Learning Plan

    All free!

    Cross-Platform Development withXamarin & Visual Studio

  • Universal Windows App Developmentwith Cortana and the Speech SDK

    Available for on-demand viewing now:

  • Recommended Xamarin Books

    Xamarin Mobile Application Development for Android

    (Mark Reynolds)

    iOS Development with Xamarin Cookbook

    (Dimitris Tavlikos)

    Xamarin Cross-Platform Application Development

    (Jonathan Peppers)

  • Thank You!

    Slides are posted on SlideShare. Demos are on GitHub.



    Twitter: @ActiveNick

    Mobile Apps: