Download presentation
Presentation is loading. Please wait.
Published byEdwin Cooper Modified over 9 years ago
1
Building Connected iOS Apps With Mobile Services Chris Risner Senior Technical Evangelist @chrisrisner Microsoft Azure
2
About me 2 Technical Evangelist @chrisrisner Chrisrisner.com Live in Washington Grew up in Michigan Mobile dev for 5+ years
3
Agenda 3 Microsoft Azure Mobile Services Features and Demos Advanced Features Scaling and Pricing Questions
4
What is Azure? Hosting and Services Massively scalable Geographically available Affordable 4
5
What is Mobile Services? 5 Storage Authentication Logic Push Scheduler
6
Demo: Getting Started Your first Mobile Service
7
Structured Storage 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 7 Microsoft Azure
8
The REST API 8 ActionHTTP MethodURL Suffix CreatePOST/TodoItem ReadGET/TodoItem?filter=id%3D42 UpdatePATCH/TodoItem/id DeleteDELETE/TodoItem/id Microsoft Azure Base Endpoint: https://MobileService.azure- mobile.net/tables/*
9
JSON to SQL Type Mappings 9 JSON TypeT-SQL Type Numeric values (integer, decimal, floating point) Float(53) Booleanbit DateTimeDateTimeOffset(3) StringNvarchar(max) Microsoft Azure
10
Auto-generated Columns id – unique guid __createdAt – date __updatedAt – date __version – timestamp Helps with concurrency and offline 10 Microsoft Azure
11
Backend Logic:.NET & JavaScript
12
Server Side Table Scripts 12 Node.js scripts Intercept CRUD requests to tables Passes through to SQL by default Fully customizable.NET backend in Visual Studio
13
Node Modules 13 request push.* console mssql tables azure sendgrid pusher twilio
14
Demo: Customizing Logic Adding Data Validation
15
Custom API Non-table based scripts Accessible from GET POST PUT PATCH DELETE Expose any functionality you want 15 Microsoft Azure
16
Push Notifications
17
Push Notification Flow 17 Microsoft Azure Client (1) (2) (3) (4)
18
Demo: Adding Push
19
Notification Hubs 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 19 Microsoft Azure
20
Authorization & Authentication
21
Data Authorization 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 21 Microsoft Azure
22
User Auth Flow (server) 22 Microsoft Azure GOOGLE FACEBOOK TWITTER MOBILE SERVICE DEVICE CREDENTIALS (via oAuth/WebView) MICROSOFT IDENTITY AUTH TOKEN GRAPH ACCESS (LIMITED)
23
User Auth Flow (client) 23 Microsoft Azure GOOGLE FACEBOOK TWITTER MOBILE SERVICE DEVICE MICROSOFT AUTH CODE AUTH CODE + TOKEN GRAPH ACCESS CREDENTIALS (via native SDKs) IDENTITY GRAPH ACCESS
24
The User object 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) 24 Microsoft Azure
25
Demo: Adding Auth Lock Down and Login
26
Command Line Interface
27
CLI 27 Create / Delete Services Inspect / Delete Table Data Create / Update / Delete Tables and Permissions Create / Upload / Delete Scripts Scale Up / Down Services Much More Across Azure
28
Demo: Using the CLI
29
Scheduler
30
Scheduled Jobs Executes a script on defined schedule Can be run on demand Ideal for any backend data processing job 30 Microsoft Azure
31
Script Source Control
32
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 32 Microsoft Azure
33
Diagnostics Logging Scale
34
Diagnostics, Logging, Scale 34 API Calls, # of Devices, Data Out Console Logging (auto error logging) Scale Service Based off API Calls Auto-scale to Save Money Free Tier for Mobile Free Tier for SQL
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 37 Microsoft Azure $ General Availability 99.9% FreeBasicStandard Usage Restrictions Up to 10 services, Up to 500 Active Devices* N/A API Calls500K (per subscription) 1.5M (per unit) 15M (per unit) ScaleN/AUp to 6 (in portal)Up to 10 (in portal) Scheduled Jobs LimitedIncluded SQL Database (required) 20MB free DB *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.
38
What is Mobile Services? 38 Storage Authentication Logic Push Scheduler
39
Resources 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 39 Microsoft Azure
40
Thanks! Questions?
42
Azure footprint 16 regions worldwide in 2014
43
Fortune 500 using Azure >57 % > 250 k Active websites Greater than 1,000,00 0 SQL Databases in Azure >20 TRILLION storage objects >300 MILLION AD users >13 BILLION authentication/wk >2>2 MILLION requests/sec >1>1 MILLION Developers registered with Visual Studio Online
45
Get started Visit azure.microsoft.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.