alec tucker an introduction to cross platform native app development using xamarin to develop, test...

33
Spark the future.

Upload: byron-collins

Post on 18-Jan-2018

217 views

Category:

Documents


0 download

DESCRIPTION

Atlanta | Beijing | London | Munich | Sydney | Toronto | Vienna

TRANSCRIPT

Page 1: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Spark the future.

Page 2: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Alec Tucker

An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor

MOB227

Page 3: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Alec TuckerHead of Mobile Product Development, APAC for The White Clarke GroupMicrosoft MVPXamarin MVPSydney Mobile.Net (Xamarin) Developers Group

Atlanta   |  Beijing  |  London  |  Munich  |  Sydney  |  Toronto  |  Vienna 

LEADERS IN FINANCETECHNOLOGY SYSTEMS

Page 4: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Develop

Page 5: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

What exactly do we mean by native app development?

Page 6: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

So why isn’t everything native?

Page 7: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Native performance from cross platform code

Xamarin.iOS does full Ahead Of Time (AOT) compilation to produce an ARM binary for Apple’s App Store.

Xamarin.Android takes advantage of Just In Time (JIT) compilation on the Android device.

Page 8: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Trends

Page 9: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Keeping up with changeiOSMacApple WatchApple TVAndroidAndroid WearGoogle GlassAmazon Fire TVXbox, plus

Page 10: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

EnvironmentStandalone PC Windows, Android

Standalone Mac iOS, Android

PC + Mac iOS, Android, Windows

Mac + Virtual PC iOS, Android, Windows

Page 11: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

EnvironmentMac + Virtual PC iOS, Android, Windows

Requires at least a Business license

Runs on Mac and Windows, supports iOS and Android

Page 12: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Environment

Page 13: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Traditional Xamarin.Forms 2.0

Shared UI Code

Models

ViewModels

Services

Views

Views Views

ViewModels

Models Services

Views

Custom Renderers

Custom Renderers Custom

RenderersNow with UWP support!

Page 14: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Test

Page 15: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Testing is easy, right?

Fragmentation

App complexity

Fast release cycles

Short sessions

High user expectations

5 iOS versions

9 Android versions20 iOS devices

1,294 Android brands

24K+ distinct Android devices

35 locales (iOS)

57 locales (Android)

6 iOS screen sizes

Connectivity variance

Device performance variations

Thousands of APIs

Memory constraints

Back end integration3rd party libraries

Authentication requirements

OWASP top 10 for mobile

20 languages (iOS)9 languages (Android)

27 screen sizes (Android)

Screen space!

Sure, apart from…

Operator constraintsOWASP ASVS Sensor availability

Page 16: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Fragmentation

Page 17: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Xamarin.UITestWrite UI test scripts in C#

Construct tests live, while app is running using app.Repl()

Run tests on emulators or on physical devices

Structured and coded in the same way as unit tests

Page 18: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

UITest Sample Code[Test]public void PerformTest(){ string firstName = "Alec"; string lastName = "Tucker";

app.WaitForElement(c => c.Marked("First name"));

app.Tap(c => c.Marked("First name")); app.EnterText(firstName);

app.Tap(c => c.Marked("Last name")); app.EnterText(lastName);

var control = app.Query(c => c.Marked("Full name")).FirstOrDefault(); Assert.IsNotNull(control);

string expectedValue = string.Format("{0} {1}", firstName, lastName); string actualValue = control.Text;

Assert.IsTrue(expectedValue == actualValue);}

Page 19: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

UITest Sample Codepublic override bool FinishedLaunching(UIApplication app, NSDictionary options){ Xamarin.Calabash.Start();

global::Xamarin.Forms.Forms.Init();

// Enable use of StyleId to identify controls in the UITest code Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) => { // http://developer.xamarin.com/recipes/testcloud/set-accessibilityidentifier-ios/ if (null != e.View.StyleId) { e.NativeView.AccessibilityIdentifier = e.View.StyleId; } };

LoadApplication(new App());

return base.FinishedLaunching(app, options);}

Page 20: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Demo

Page 21: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Xamarin TestCloudTest on market leading devices without buying them all

Test on large numbers of devices

View test results and share results with clients

Page 22: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Xamarin TestCloud

Page 23: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Xamarin TestCloud

Page 24: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Monitor

Page 25: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

“Listening to what people say is misleading: you have to watch what they actually do”Jakob Nielsen“perhaps the best-known design and usability guru on the Internet” (Financial Times)“the guru of Web page usability” (The New York Times)

Page 26: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Cross platform, as you’d expectXamarin.iOS, Xamarin.Android, Xamarin.Mac, Windows Phone, Windows Store, Windows DesktopAutomatic catching of unhandled exceptions

Xamarin Insights

CollectionTypes

DisableCollectionDisabledCollectionTypes

DisableDataTransmission

ForceDataTransmission

IdentifyInitialize

IsInitialized

Report ReportSeverity

Save Stop

TrackTrackTime

Traits

Page 27: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227
Page 28: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Xamarin InsightsIntegrates with

Github

PivotalTracker Jira

Slack HipChat

Campfire

Visual Studio Online

Page 29: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Write interface, inject/find implementation

Pre-compiler directives

Command tracking with snippets in Visual Studio

Using with Mvvm

Page 30: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Sydney Mobile .Net (Xamarin) Developershttp://www.meetup.com/SydneyMobileDotNetDevelopers/December 8th: Xamarin 2015 Roundup – win a Xamarin license!!!

Queensland C# Mobile Developershttp://www.meetup.com/Queensland-based-MonoTouch-and-Mono-for-

Android/ November 24th

Melbournehttp://www.meetup.com/Melbourne-Xamarin-Meetup/

F# Sydneyhttp://www.meetup.com/fsharpsydney/ December 1st

Find out more

Alec Tuckerwww.whiteclarkegroup.com

@alecdtuckerblog.alectucker.comlinkedin.com/in/alectucker

Page 31: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Complete your session evaluation on My Ignite for your chance to win one of many daily prizes.

Page 32: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

Continue your Ignite learning pathVisit Microsoft Virtual Academy for free online training visit https://www.microsoftvirtualacademy.comVisit Channel 9 to access a wide range of Microsoft training and event recordings https://channel9.msdn.com/Head to the TechNet Eval Centre to download trials of the latest

Microsoft products http://Microsoft.com/en-us/evalcenter/

Page 33: Alec Tucker An Introduction to Cross Platform Native App Development using Xamarin to Develop, Test and Monitor MOB227

© 2015 Microsoft Corporation. All rights reserved.Microsoft, Windows and other product names are or may be registered

trademarks and/or trademarks in the U.S. and/or other countries.MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,

AS TO THE INFORMATION IN THIS PRESENTATION.