alec tucker an introduction to cross platform native app development using xamarin to develop, test...
DESCRIPTION
Atlanta | Beijing | London | Munich | Sydney | Toronto | ViennaTRANSCRIPT
Spark the future.
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
Develop
What exactly do we mean by native app development?
So why isn’t everything native?
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.
Trends
Keeping up with changeiOSMacApple WatchApple TVAndroidAndroid WearGoogle GlassAmazon Fire TVXbox, plus
EnvironmentStandalone PC Windows, Android
Standalone Mac iOS, Android
PC + Mac iOS, Android, Windows
Mac + Virtual PC iOS, Android, Windows
EnvironmentMac + Virtual PC iOS, Android, Windows
Requires at least a Business license
Runs on Mac and Windows, supports iOS and Android
Environment
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!
Test
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
Fragmentation
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
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);}
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);}
Demo
Xamarin TestCloudTest on market leading devices without buying them all
Test on large numbers of devices
View test results and share results with clients
Xamarin TestCloud
Xamarin TestCloud
Monitor
“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)
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
Xamarin InsightsIntegrates with
Github
PivotalTracker Jira
Slack HipChat
Campfire
Visual Studio Online
Write interface, inject/find implementation
Pre-compiler directives
Command tracking with snippets in Visual Studio
Using with Mvvm
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
Complete your session evaluation on My Ignite for your chance to win one of many daily prizes.
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/
© 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.