33
Building Cross Platform Apps with C# & VS Mike James Developer Evangelist Xamarin

Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Building Cross PlatformApps with C# & VS Mike JamesDeveloper EvangelistXamarin

Page 2: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Who is this guy?

Mike JamesXamarin Program Manager @ Microsoft

mikecodes.net

Page 3: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Who is this guy?

Beer Drinkin StepCounter Dutch Spelling HydrateiOS & Azure iOS & Android iOS OS X

Page 4: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

London Eye

Page 5: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Cross platform developer

Page 6: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High
Page 7: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Build Apps

Multiple Times

Page 8: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Lowest

Common

Denominator

Page 9: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Xamarin’s Unique Approach

iOS C# UI Windows C# UIAndroid C# UI

Shared C# Mobile

• 100% Native API Access • High Performance• Shared C# code base

Shared C# Core

Storyboard or XIB Android XML (AXML) XAML

Page 10: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Windows API

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

Page 11: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

iOS APIs

MapKit UIKit iBeacons CoreGraphics CoreMotion

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

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

Page 12: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Android APIs

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

Page 13: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

.IPA .APK

Xamarin.Android takes advantage of Just In

Time (JIT) compilation on the Android

device.

Xamarin.iOS does full Ahead Of Time (AOT)

compilation to produce an ARM binary for Apple’s

App Store.

Native Performance

Page 14: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Number of APIs

Android40,000+

iOS33,000 +

Page 15: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Xamarin Traditional

Cons• Maximum of 80 to 90% code reuse

• XAML not support outside of Windows

Pros• UI Designers

• Easy access to every platform API

• 100% Native UI & Performance

Page 16: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Demo Time

Traditional Demo

Page 17: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Xamarin + Xamarin.Forms

iOS C# UI Windows C# UIAndroid C# UI

Shared C# Core

Traditional Xamarin

Shared C# Backend

Shared UI CodeShared UI Code (C# or XAML)

Shared C# Core

Xamarin.Forms

Page 18: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

What’s Included

Shared C# Backend

Shared UI CodeShared UI Code (C# or XAML)

Shared C# Core

✓ 40+ Pages, layouts, and controls(Build from code behind or XAML)

✓ Two-way data binding

✓ Navigation

✓ Animation API

✓ Dependency Service

✓ Messaging Center

Page 19: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Xamarin.Forms

Cons• No UI Designer

• Difficult to customise

Pros• Up to 97% code reuse

• 100% Native UI & Performance

• Supports XAML across all 3 platforms

• Easy to get started with

Page 20: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Forms Traditional

Customisation &

Complexity of app

Ease of development

Traditional vs Forms

Page 21: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Pages

Stack Absolute Relative Grid ContentView ScrollView Frame

Content MasterDetail Navigation Tabbed Carousel

Layouts

Page 22: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

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

Page 23: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Ecosystem

Page 24: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Demo Time

Forms Demo

Page 25: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High
Page 26: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

XAML PreviewerIn preview

Page 27: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Native Embedding

Page 28: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Native Embedding

Page 29: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Xamarin Dev Days

[email protected]

Page 30: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Xamarin Dev Days

OR

Page 31: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Thank you.

Mike James

Xamarin Program Manager -

Microsoft

Questions?

Page 32: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

Find me online

@MikeCodesDotNET

MikeCodesDotNET

[email protected] [email protected]

Page 33: Building Cross Platform Apps with C# & VS · Xamarin’s Unique Approach iOS C# UI Android C# UI Windows C# UI Shared C# Mobile •Shared C# code base •100% Native API Access •High

© 2014 Microsoft Corporation. All rights reserved.