Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Ignite 2016 5/25/ :22 PM

Similar presentations


Presentation on theme: "Microsoft Ignite 2016 5/25/ :22 PM"— Presentation transcript:

1 Microsoft Ignite 2016 5/25/ :22 PM Developing Cross Platform Mobile Line of Business Applications with Azure CLD335a Lewis Benge © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2 Enterprise Mobile Architecture
Edge Perimeter (On-Premises and Cloud) Security & Policies Identity Management Application Management Data Consistency Monitoring Analytics API Gateway (REST, JMS, HTTP, Sockets, XML, SOAP) Service Mediation Message Routing Logging / Auditing Event Handling Services Orchestration Enterprise Systems

3 Azure Active Directory
Azure Mobile Services Offline Sync Data connections Backend code .NET Node.js SQL Mongo Tables O365 API Apps Web App Mobile SDKs User Authentication REST API Windows iOS Android HTML 5/JS Xamarin PhoneGap Sencha Facebook Twitter Microsoft Google Azure Active Directory Offline sync Push Notifications Windows Android Chrome iOS OSX In-App Kindle

4 Hosting Benefits Courtesy of Azure Web Apps (aka Azure Websites)
Richer monitoring and alerting Traffic manager Custom CNAMEs VNET and VPN Backup and restore More VM size and instance options In production A/B testing Auto load-balance Share capacity across Web and Mobile Staging slots Validate changes in your staging environment before publishing to production More devops features Support for BitBucket and Visual Studio Online; seamless integration with GitHub Web Jobs

5 Demo: A quick tour of Azure Mobile Apps

6 Identity

7 Active Directory Authentication Library (ADAL)
Available on multiple platforms .NET, Windows Store, Windows Phone 8.1, iOS, Android, Node.JS, Java Open source Consistent primitives, native programming models Sophisticated features Works across Windows Server and Azure Active Directory Cache and automatic refresh Multi user support NOT a protocol library

8 ADAL v3 and Xamarin A PCL containing all the main primitives
Build 2015 5/25/ :22 PM ADAL v3 and Xamarin A PCL containing all the main primitives Platform specific assemblies handling presentation, token storage Dynamic dependency injection ADAL .NET v3 Nuget C# iOS Project C# Android Project C# Windows Project PCL Android PCL iOS PCL iOS .NET Desktop Android PCL Project Windows Store Windows Phone 8.1 Store PCL © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

9 ADAL – Main Token Acquisition Pattern
Abstracts away most protocol considerations Handles tokens persistence & refresh automatically AuthenticationContext ctx= new AuthenticationContext(" AuthenticationResult rez = await ctx.AcquireTokenAsync( " "5fc4a5a2-78d5-4d94-b890-a6e6b ");

10 ADAL .NET Current supported version: V3.x Desktop
Default cache in-memory Extra flows for public clients only: Windows integrated authentication Direct use of username & password Windows Store & WinRT Persistent per-app cache Windows Runtime Components Works with C#, WinJS, C++ Full Xamarin Support

11 Demo: Authenticating against Azure AD

12 Data & Sync

13 The best mobile apps handle network interruptions gracefully.
5/25/ :22 PM The best mobile apps handle network interruptions gracefully. © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

14 5/25/ :22 PM Adding offline sync to an app is usually hard. With App Service, it’s easy. © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

15 Why use mobile data sync?
Improve app responsiveness by caching server data locally on the device. Make apps resilient against intermittent network connectivity. Allow end-users to create and modify data even when there is no network access. Detect and handle conflicts when the same record is modified by more than one client.

16 Offline Data Sync

17 Offline Data Sync

18 Sync data & related files
5/25/ :22 PM Sync data & related files © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

19 Mobile file sync architecture
Microsoft Ignite 2016 5/25/ :22 PM Mobile file sync architecture Mobile App backend reads from SQL and writes through to CRM Mobile client SDK syncs SQLite db with Azure Mobile backend Note: Client apps do not communicate directly with backend data source © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

20 Demo: Enabling offline sync
Microsoft Ignite 2016 5/25/ :22 PM Demo: Enabling offline sync © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

21 5/25/ :22 PM Per-User Data © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

22 Filtering results on the server
5/25/ :22 PM Filtering results on the server [Authorize] Public class JobController : TableController<JobDTO> { public async Task<IQueryable<JobDTO>> GetAllJobs() { var jobs = this.context.Jobs; var aadObjectId = await this.GetAadObjectId(); if (aadObjectId != null) jobs = jobs.Where(j => j.AgentId == aadObjectId; return jobs; } © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

23 5/25/ :22 PM Push-to-sync © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

24 Microsoft Ignite 2016 5/25/ :22 PM Push-to-sync Client devices sync infrequently or only by manual user action Saves battery Saves data usage Reduces server load Client registers queries with server Server sends a push notification when client needs new data When client receives push notification, it syncs that query. © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

25 Server side Client query is mapped to a Notification Hub tag
Microsoft Ignite 2016 5/25/ :22 PM Server side Client query is mapped to a Notification Hub tag Server sends push notification when query result has changed If data changes infrequently, server can send the push when data changes Else, scheduled job on server checks for changes to registered queries. © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

26 Intro to Azure Notification Hubs
Microsoft Ignite 2016 5/25/ :22 PM Intro to Azure Notification Hubs Client app retrieves handle from Platform Notification Service (PNS), sends to App Service backend Backend service registers with Notification Hub, using tags to represent a query App back-end sends notification to logical user or group of users using Notification Hub tags Notification Hub delivers notifications to matching devices via PNS Notification Hub manages scale Notification Hub maps tags to device handles © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

27 Managing Scale More clients means more load on data source
Design queries so that server can use indexed columns to determine query change Minimize use of client-specific queries Reduces the number of “check changes” queries the server runs Consider sharding the database Consider using a secondary DB for change queries

28 5/25/ :22 PM Reference Data © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

29 Read directly for SQLite Store
5/25/ :22 PM Read directly for SQLite Store public async Task InitializeAsync() { localStore = new MobileServiceSQLiteStore(“localdata.db”); localStore.DefineTable<Job>(); await this.MobileService.SyncContext.InitializeAsync(localStore); jobTable = this.MobileService.GetSyncTable<Job>(); } private async Jobject ReadJobs var query = .. await store.ReadAsync(query); © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

30 Summary: Azure Mobile Apps
Lightweight and composable Eliminates burdens of database-to-database sync Works with a variety of server data stores SQL, Azure Tables, Mongo, Dynamics CRM, Salesforce, etc. Multi-platform client SDKs Windows Universal, Xamarin, iOS, Android Supports both “primarily online” and “occasionally connected” scenarios Explicit push and pull leaves control to the developer Flexible, powerful and secure Supports custom local storage layers Detect and handle conflicts on server or client

31 Continue your Ignite learning path
5/25/ :22 PM Continue your Ignite learning path Visit Channel 9 to access a wide range of Microsoft training and event recordings Head to the TechNet Eval Centre to download trials of the latest Microsoft products Visit Microsoft Virtual Academy for free online training visit © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

32 Thank you Chat with me in the Speaker Lounge
5/25/ :22 PM Thank you Chat with me in the Speaker Lounge © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "Microsoft Ignite 2016 5/25/ :22 PM"

Similar presentations


Ads by Google