Azure MobileApp & Xamarin.Forms

25
Xamarin & Azure Mobile Apps Alessandro Pozone @TPOZ1 Xamarin Student Partner

Transcript of Azure MobileApp & Xamarin.Forms

Page 1: Azure MobileApp & Xamarin.Forms

Xamarin & Azure Mobile AppsAlessandro Pozone

@TPOZ1

XamarinStudentPartner

Page 2: Azure MobileApp & Xamarin.Forms

MOBILE APPS ARCHITECTURES

Page 3: Azure MobileApp & Xamarin.Forms

Silo Approach

Nosharedcode•Manylanguages&developmentenvironments•Multipleteams

iOS

Objective-CXcode

Android

JavaAndroidStudio

Windows

C#VisualStudio

Page 4: Azure MobileApp & Xamarin.Forms

Write Once, Run Anywhere

AppGenerator

LuaJavascript

ActionscriptHTML+CSS

LimitednativeAPIaccess•Slowperformance•Pooruserexperience

Page 5: Azure MobileApp & Xamarin.Forms

Xamarin’s Unique Approach

SharedC#codebase•100%nativeAPIaccess•Highperformance

iOSC#UI WindowsC#UIAndroidC#UI

SharedC#

Page 6: Azure MobileApp & Xamarin.Forms

C#

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

Windows APIs

Page 7: Azure MobileApp & Xamarin.Forms

MapKit UIKit iBeacon CoreGraphics CoreMotion

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

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

C#

iOS APIs

Page 8: Azure MobileApp & Xamarin.Forms

Text-to-speech ActionBar PrintingFramework Renderscript NFC

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

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

C#

Android APIs

Page 9: Azure MobileApp & Xamarin.Forms

XAMARIN.IOS does full Ahead Of Time(AOT) compilation to produce an ARMbinary for Apple’s App Store.

XAMARIN.ANDROID takes advantageof Just In Time (JIT) compilation on theAndroid device.

.NET

C# Compileand Link .APK

Bindings

RunsNatively

IL+

JIT

Native Performance

.NET

C# Compileand Link .APK

Bindings

RunsNatively

IL+

JITAOT .APP

ARM BINARY

Runs Natively

Page 10: Azure MobileApp & Xamarin.Forms

ANYTHING YOU CAN DO IN OBJECTIVE-C, SWIFT, OR JAVA CAN BE DONE IN C# WITH XAMARIN

Page 11: Azure MobileApp & Xamarin.Forms

XAMARIN FORMS

Page 12: Azure MobileApp & Xamarin.Forms

Build native UIs for iOS, Android, and Windows Phone from a single, shared C# codebase.

XAMARIN.FORMS

Page 13: Azure MobileApp & Xamarin.Forms

Xamarin + Xamarin.Forms

TraditionalXamarinApproach WithXamarin.Forms:More code-sharing, all native

iOSC#UI WindowsC#UIAndroidC#UI

SharedC#Backend

SharedUICode

SharedC#Backend

Page 14: Azure MobileApp & Xamarin.Forms

Native UI from shared code<xml version="1.0" encoding="UTF-8"?>

<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"x:Class="MyApp.MainPage">

<TabbedPage.Children><ContentPage Title="Profile" Icon="Profile.png">

<StackLayout Spacing="20" Padding="20"VerticalOptions="Center">

<Entry Placeholder="Username"Text="{Binding Username}"/>

<Entry Placeholder="Password"Text="{Binding Password}"IsPassword="true"/>

<Button Text="Login" TextColor="White"BackgroundColor="#77D065"Command="{Binding LoginCommand}"/>

</StackLayout></ContentPage><ContentPage Title="Settings" Icon="Settings.png">

<!-- Settings --></ContentPage>

</TabbedPage.Children></TabbedPage>

</xml>

Page 15: Azure MobileApp & Xamarin.Forms

Xamarin.Forms is best for: Xamarin.iOS / Xamarin.Android is best for:

• Data entry apps

• Prototypes and proofs-of-concept

• Apps that require little platform-specific functionality

• Apps where code sharing is more important than custom UI

Learn more: xamarin.com/forms Learn more: xamarin.com/platform

• Apps that require specialized interaction

• Apps with highly polished design

• Apps that use many platform-specific APIs

• Apps where custom UI is more important than code sharing

Which Xamarin approach is best for your app?

Page 16: Azure MobileApp & Xamarin.Forms

AccelerateyourmobiledevelopmentjourneywiththisbooklegendaryCharlesPetzold

Learneverythingfromintroductoryconceptstoadvancedtopicslikeaddingcustomviewsandusingplatform-specificfeatures

100%FREE

Page 17: Azure MobileApp & Xamarin.Forms

AZURE MOBILE APPS

Page 18: Azure MobileApp & Xamarin.Forms

Storage

Authentication

Push

What is Mobile Services?

Page 19: Azure MobileApp & Xamarin.Forms

STORAGE

Page 20: Azure MobileApp & Xamarin.Forms

Structured Storage

Powered by SQL DatabaseSupports rich querying capabilitiesData management in:• Azure Portal• SQL Portal (Silverlight)• SQL Management Studio• REST API• Azure CLI Tools• SQL CLI

Page 21: Azure MobileApp & Xamarin.Forms

PUSH NOTIFICATIONS

Page 22: Azure MobileApp & Xamarin.Forms

Push Notification Flow

Page 23: Azure MobileApp & Xamarin.Forms

AUTHENTICATION

Page 24: Azure MobileApp & Xamarin.Forms

User Auth Flow (client) GOOGLE

FACEBOOK

TWITTER

MOBILESERVICE

DEVICE

MICROSOFTACCOUNT

AAD

Page 25: Azure MobileApp & Xamarin.Forms

DEMO