building connected io s apps

of 27 /27
Building Connected iOS Apps Chris Risner Technical Evangelist Microsoft http://chrisrisner.com @chrisrisner

Upload: paxton

Post on 11-Feb-2016

104 views

Category:

Documents


0 download

DESCRIPTION

http://chrisrisner.com @ chrisrisner. Building Connected iO S Apps. Chris Risner Technical Evangelist Microsoft. How we got here Mobile Services Features and demos Win a prize Questions. What we’re going to talk about. How did we get here?. What we had. Storage. Identity. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Building Connected  iO S  Apps

Building Connected iOS AppsChris RisnerTechnical EvangelistMicrosoft

http://chrisrisner.com@chrisrisner

Page 2: Building Connected  iO S  Apps

• How we got here• Mobile Services• Features and demos• Win a prize• Questions

What we’re going to talk about

Page 3: Building Connected  iO S  Apps

How did we get here?

Page 4: Building Connected  iO S  Apps

What we had

Cloud services

Storage Identity

Page 5: Building Connected  iO S  Apps

What we neededCross Platform Features

Page 6: Building Connected  iO S  Apps

What we made

Page 7: Building Connected  iO S  Apps

What is Windows Azure Mobile Services?

Data

Notifications

Auth

Server Logic

Scheduler

Logging & Diag

Scale

Page 8: Building Connected  iO S  Apps

Getting Started a backend for your mobile app in minutes Demo

Page 9: Building Connected  iO S  Apps

Structured StorageStructured Storage with SQL DatabaseSame DB – multiple Mobile Services

AppX.TodoitemAppY.Todoitem

Manage data inPortal, SQL PortalSQL Management StudioREST APICLI Tools

Page 10: Building Connected  iO S  Apps

REST API to SQL type mappingsJSON Value T-SQL TypeNumeric values (integer, decimal, floating point)

Float

Boolean BitDateTime DateTimeOffset(3)String Nvarchar(max)

Page 11: Building Connected  iO S  Apps

Server LogicAutomatic REST API generated for storageDynamic Schema on/offAbility to customize server logic that intercepts table requests

Page 12: Building Connected  iO S  Apps

Server LogicSupported Modules + Globals

requestconsolepush.*tablesmssqlstatusCodesazurestore (pusher, sendgrid, twilio, etc)

mssql.query('select top 1 * from statusupdates', { success: function(results) { console.log(results);

} }

);

Page 13: Building Connected  iO S  Apps

Server Logicadding server logic on CRUD

operations Demo

Page 14: Building Connected  iO S  Apps

Push Notification Lifecycle Overview 1. Register for push

notifications2. Register with your

send token to Mobile Service

3. Push from server side scripts

iOS(1)

(2)

(3)(3)

Page 15: Building Connected  iO S  Apps

Push NotificationsDemo

Page 16: Building Connected  iO S  Apps

User Auth

Page 17: Building Connected  iO S  Apps

Auth Data and ScriptsTable level permissions for each CRUD operation

EveryoneAnyone with the Application KeyOnly Authenticated UsersOnly Scripts and Admins

More granular control with server side scriptsuser.level: {admin, authenticated, anonymous}user.userId: id or undefined if not authenticated

Page 18: Building Connected  iO S  Apps

Adding Authenticationintegrating with Twitter Demo

Page 19: Building Connected  iO S  Apps

Command Line ToolsCreate servicesDelete servicesCreate (with auth options), update, delete, list tablesUpload, delete, download, list scriptsGet configuration

Page 20: Building Connected  iO S  Apps

Using the CLI Demo

Page 21: Building Connected  iO S  Apps

SchedulerExecute scripts on a Schedule

by Minutesby Hoursby DaysBy Months

Execute scripts on DemandExamples Periodic purge of old data Poll and aggregate from 3rd party (Twitter, RSS, others) Process/resize images Schedule sending push notifications for a given time of day

Page 22: Building Connected  iO S  Apps

Scheduling a taskAdding Todo Items Demo

Page 23: Building Connected  iO S  Apps

Diagnostics, Logging and ScaleDiagnosticsAPI callsCPU TimeData Out

Loggingconsole.error(…)console.log(…)…

Scale - ComputeScale out instance countScale up VM size

Scale - StorageScale out mobile service tenant to dedicated SQL DBScale up SQL DB

Page 24: Building Connected  iO S  Apps

Diagnostics, Logging, Scale

Demo

Page 25: Building Connected  iO S  Apps

Pricing Example:

10 x Mobile Services on shared instances

100MB SQLDatabase

Unlimited data in

<165MB daily out

How?10 FREE mobile services on shared instanceIncludes 165MB/day of FREE data out from API calls Cost - All services sharing a 100MB DB is $5 USD / Month Use Pricing Calculator to Estimate your costs

=$5/ Month

Note: Free data out is per subscription, not per mobile service

Page 26: Building Connected  iO S  Apps

Summary

Data

Notifications

Auth

Server Logic

Scheduler

Logging & Diag

Scale

Page 27: Building Connected  iO S  Apps

Useful ResourcesGet a Windows Azure Free Trial Accounthttp://www.windowsazure.com/

Learn with Brent SimmonsFind videos, tutorials and more at https://www.windowsazure.com/ios

Help with Mobile ServicesQ&A Forum: Windows Azure Mobile Services ForumFeature Rqst: Windows Azure Mobile Services UserVoiceFeedback: [email protected]: @chrisrisner

Presentations, demos, hands on labsWindows Azure Training Kit: Download here