1 / 45

Building Connected iOS Apps With Mobile Services

Building Connected iOS Apps With Mobile Services. Chris Risner Senior Technical Evangelist @ chrisrisner. Microsoft Azure. About me. @ chrisrisner. Technical Evangelist. Live in Washington. Chrisrisner.com. Mobile dev for 5+ years. Grew up in Michigan. Agenda. Mobile Services.

scot
Télécharger la présentation

Building Connected iOS Apps With Mobile Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building Connected iOS Apps With Mobile Services Chris Risner Senior Technical Evangelist @chrisrisner Microsoft Azure

  2. About me @chrisrisner Technical Evangelist Live in Washington Chrisrisner.com Mobile dev for 5+ years Grew up in Michigan

  3. Agenda Mobile Services Microsoft Azure Advanced Features Features and Demos Questions Scaling and Pricing

  4. What is Azure? Hosting and Services Massively scalable Geographically available Affordable

  5. What is Mobile Services? Storage Authentication Logic Push Scheduler

  6. Demo: Getting Started Your first Mobile Service

  7. Structured Storage Microsoft Azure • Powered by SQL Database • Supports rich querying capabilities • Dynamic Schematization • Data management in: • Azure Portal • SQL Portal (Silverlight) • SQL Management Studio • REST API • Azure CLI Tools • SQL CLI

  8. The REST API Base Endpoint: https://MobileService.azure-mobile.net/tables/* Microsoft Azure

  9. JSON to SQL Type Mappings Microsoft Azure

  10. Auto-generated Columns Microsoft Azure • id – unique guid • __createdAt – date • __updatedAt – date • __version – timestamp • Helps with concurrency and offline

  11. Backend Logic:.NET & JavaScript

  12. Server Side Table Scripts Intercept CRUD requests to tables Node.js scripts Fully customizable Passes through to SQL by default .NET backend in Visual Studio

  13. Node Modules push.* request sendgrid mssql console pusher azure tables twilio

  14. Demo: Customizing Logic Adding Data Validation

  15. Custom API Microsoft Azure • Non-table based scripts • Accessible from • GET • POSTPUTPATCHDELETE • Expose any functionality you want

  16. Push Notifications

  17. Push Notification Flow Mobile Services Client Register for push notifications with APNS Send your identifier to Mobile Service Send push from server scripts APNS delivers notification to device App (2) (3) (1) APNS (4) Microsoft Azure

  18. Demo: Adding Push

  19. Notification Hubs Microsoft Azure • Separate from Mobile Services • Can be used regardless of whether you’re storing data in Azure • Extremely scalable push notifications • Cross platform support • Push to iOS, Android, Kindle, Windows Phone, Windows Store • Tags (i.e. tie my registration to this topic or user ID) • Templates (i.e. when I get a push, send it in this format) • Connect to using Azure module

  20. Authorization&Authentication

  21. Data Authorization Microsoft Azure • Per HTTP method auth options: • App Key Required • Not ideal for production use • Everyone • Authenticated Users • Admins and other scripts • Requires Master Key as header • 400 Unauthorized response if security check fails

  22. User Auth Flow (server) GOOGLE CREDENTIALS (via oAuth/WebView) FACEBOOK AUTH TOKEN DEVICE GRAPH ACCESS (LIMITED) TWITTER IDENTITY MICROSOFT MOBILE SERVICE Microsoft Azure

  23. User Auth Flow (client) CREDENTIALS(via native SDKs) GOOGLE AUTH CODE AUTH CODE + TOKEN FACEBOOK GRAPH ACCESS DEVICE GRAPH ACCESS TWITTER MICROSOFT IDENTITY MOBILE SERVICE Microsoft Azure

  24. The User object Microsoft Azure • User.level • Admin • Authenticated • Anonymous • User.userId • Provider:id or undefined • User.getIdentities() • UserId • Provider Access Token / Secret • Basic user information (i.e. name, username, locale, picture, link)

  25. Demo: Adding Auth Lock Down and Login

  26. Command Line Interface

  27. CLI Inspect / Delete Table Data Create / Delete Services Create / Upload / Delete Scripts Create / Update / Delete Tables and Permissions Much More Across Azure Scale Up / Down Services

  28. Demo: Using the CLI

  29. Scheduler

  30. Scheduled Jobs Microsoft Azure Executes a script on defined schedule Can be run on demand Ideal for any backend data processing job

  31. ScriptSourceControl

  32. Script Source Control Microsoft Azure • Creates a Git repo in Azure • Access table, scheduler, custom API, shared scripts and permissions • Pushing changes triggers a redeploy of your Mobile Service • Enables installing NPM modules • Shared Scripts • Create scripts that can be used from all other scripts in your Service

  33. DiagnosticsLoggingScale

  34. Diagnostics, Logging, Scale Console Logging (auto error logging) API Calls, # of Devices, Data Out Auto-scale to Save Money Scale Service Based off API Calls Free Tier for SQL Free Tier for Mobile

  35. Mobile Service Scaling  Free: 500k calls / month / subscription  Basic: 1.5M calls / unit (6) / month  Standard: 15M calls / unit (10) / month

  36. Demo: Scaling Leaving Free Mode and Turning on AutoScale

  37. Mobile Service Tiers service level agreements usage & licensing $ General Availability99.9% *Active devices refers to the number of physical devices and emulators that make at least one call to or receive a push notification from your mobile service. Microsoft Azure

  38. What is Mobile Services? Storage Authentication Logic Push Scheduler

  39. Resources Microsoft Azure • Get a FREE Microsoft Azure Trial Account: • http://azure.microsoft.com • Videos, Tutorials, and More • http://azure.microsoft.com/ios • SDK Source Code on GitHub • https://github.com/Azure/azure-mobile-services • Contact Details • http://chrisrisner.com • http://aka.ms/CommonWams • @chrisrisner

  40. Thanks! Questions?

  41. 16 regions worldwide in 2014 Azure footprint

  42. >57% >250k Fortune 500 using Azure Greater than 1,000,000 Active websites >20 >300 • TRILLIONstorageobjects MILLION >1 AD users MILLION Developers registered with Visual Studio Online SQL Databases in Azure >2 >13 MILLIONrequests/sec BILLION authentication/wk

  43. Get started Visit azure.microsoft.com

More Related