21
Building Windows Store Apps with Windows Azure Mobile Services Pranav Ainavolu Thomson Reuters @a_pranav | http://pranavon.net

Windows8 and Windows Azure Mobile Services

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Windows8 and Windows Azure Mobile Services

Building Windows Store Apps with Windows Azure Mobile Services

Pranav AinavoluThomson Reuters@a_pranav | http://pranavon.net

Page 2: Windows8 and Windows Azure Mobile Services

Windows Azure Mobile ServicesDataPush NotificationsAuthSchedulerDiagnostics & Scale

Agenda

Page 3: Windows8 and Windows Azure Mobile Services

What is Windows Azure Mobile Services?

Data

Notifications

Auth

Server LogicLogging & Diag

ScaleScheduler

Page 4: Windows8 and Windows Azure Mobile Services

Key ScenariosWindows Azure Mobile Services are ideal for:

Modern mobile appsWindows Store Apps, Windows Phone, iOS, Android

Common ScenariosReduces the friction associated with repeating common tasks such as user authentication, push notifications and structured storage

Rapid DevelopmentTime is money. Get your app up and running sooner when you use Mobile Services to configure a straightforward and secure backend in less than five minutes.

Page 5: Windows8 and Windows Azure Mobile Services

Getting Starteda backend for your mobile app in

minutes Demo

Page 6: Windows8 and Windows Azure Mobile Services

Structured StorageStructured Storage with SQL DatabaseIf using single database apps are partitioned by schema

AppX.TodoitemAppY.Todoitem

Manage data inPortal, SQL PortalSQL Management StudioREST APICLI Tools

Page 7: Windows8 and Windows Azure Mobile Services

Server Logic

Automatic service REST API generated for storageDynamic Schema on/offAbility to author server logic that intercepts CRUD operation pipelineRich querying capability

Page 8: Windows8 and Windows Azure Mobile Services

Server Logic

Supported Modules + Globalsmssqlrequestconsolepush.*tablesstatusCodes

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

} }

);

Page 9: Windows8 and Windows Azure Mobile Services

REST API to SQL type mappings

JSON Value T-SQL Type

Numeric values (integer, decimal, floating point)

Float

Boolean Bit

DateTime DateTimeOffset(3)

String Nvarchar(max)

Page 10: Windows8 and Windows Azure Mobile Services

Server Logicadding server logic on CRUD

operations Demo

Page 11: Windows8 and Windows Azure Mobile Services

Push Notification Lifecycle Overview 1. Request Channel URI

2. Register with your Cloud Service

3. Authenticate & Push Notification

Windows 8

(1)

(2)

(3)

(3)

Page 12: Windows8 and Windows Azure Mobile Services

Push Notifications

Integrates with WNS to provide Toast, Tile, Badge and Raw notificationsPortal captures your WNS client secret and package SIDpush.wns.* provides:

clean easy object model to compose notifications

Performs auth against WNS for you

Page 13: Windows8 and Windows Azure Mobile Services

Push NotificationsDemo

Page 14: Windows8 and Windows Azure Mobile Services

Auth*Authenticate against Microsoft Account, Twitter, Facebook, GoogleTable 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 15: Windows8 and Windows Azure Mobile Services

Adding Authenticationhooking up Microsoft Account in

minutes Demo

Page 16: Windows8 and Windows Azure Mobile Services

SchedulerExecute scripts on a Schedule

by Minutes

by Hours

by Days

By 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 17: Windows8 and Windows Azure Mobile Services

Demoscheduler Demo

Page 18: Windows8 and Windows Azure Mobile Services

Diagnostics, Logging and Scale

DiagnosticsAPI callsCPU TimeData Out

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

Scale - ComputeScale out instance countScale up VM size

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

Page 19: Windows8 and Windows Azure Mobile Services

Diagnostics, Logging, Scale

Demo

Page 20: Windows8 and Windows Azure Mobile Services

Summary

Data

Notifications

Auth

Server LogicLogging & Diag

ScaleScheduler

Page 21: Windows8 and Windows Azure Mobile Services

Namaste!