320 likes | 434 Views
Building Windows Phone Apps with Mobile Services. Speaker Name Speaker Title Speaker Company Email: Twitter:. Agenda. Mobile Services. Data Storage. Push Notifications. Security and Authentication. Other Features and Scaling. Questions. What is Mobile Services?. Auth. Data.
E N D
Building Windows Phone Apps with Mobile Services Speaker Name Speaker Title Speaker Company Email: Twitter:
Agenda Mobile Services Data Storage Push Notifications Security and Authentication Other Features and Scaling Questions
What is Mobile Services? Auth Data Notifications Logging & Diag Server Scripts Scheduler Scale
Structured Storage Powered by SQL Database Same DB – Multiple Mobile Services AppX.Todoitem AppY.Todoitem Data management in Windows Azure Portal SQL Portal, SQL Management Studio REST API CLI Tools
The REST API Base REST API Endpoint URL https://Mobileservice.azure-mobile.net/tables/* Data Operations and their REST Equivalents
Server Side Scripts Customizing logic on the server Node.js scripts Intercept CRUD requests to tables Passes through to SQL by default Fully customizable logic flow
Node Modules Extensibility through numerous included modules request push.* sendgrid console mssql pusher statusCodes azure twilio
Push Notification Lifecycle Overview Mobile Services Windows Phone Request Channel URI Register with your Cloud Service Push Notification Push Enabled App (2) (1) (3) (1) Microsoft Push Notification Service Push Client Service (3)
Push Notifications Support push for WNS, MPNS, APNS. For WP: Integrates with MPNS to provide Toast, Tile and Raw notifications push.mpns.* provides: clean easy object model to compose notifications push.mpns.[sendFlipTile(..) | sendTile(..) | sendToast(..) | sendRaw(..)]
Auth* Authenticate against Microsoft Account, Twitter, Facebook, Google Table level permissions for each CRUD operation Everyone Anyone with the Application Key Only Authenticated Users Only Scripts and Admins More granular control with server side scripts user.level: {admin, authenticated, anonymous} user.userId: id or undefined if not authenticated
The User object User.level Anonymous Authenticated Admin User.userId Provider:id or undefined User.getIdentities() UserId Provider Access Token / Secret
Custom API Non-table based scripts Accessible from Get Post Put Patch Delete Same permissions as tables
Using the Scheduler Execute scripts on a schedule Execute scripts on demand Frequency and length of execution based off of service level Ideal for backend data processing
Script Source Control Handled through GIT repo Access to table, scheduler, custom API, shared scripts, and permissions Shared Scripts Make scripts accessible from other scripts Just like creating Node.js modules NPM Ability to use ‘npm install module’ to download NPM modules
Scheduler, Script Source Control, • Custom API, NPM
Command Line Tools Scriptable control from PowerShell / Bash Create / Delete Services Inspect / Delete Table Data Create / Update / Delete Tables and Permissions Create, / Upload / Delete Scripts Scale Up / Down Services Much More!
Diagnostics, Logging, Scale API Calls, Devices, Data Out Scale service based off of API Calls Console logging from Scripts Scale SQL DB / Server
Service Scale Free • 500K API calls per subscription per month Standard • 1.5M API calls per unit per month Premium • 15M API calls per unit per month
Mobile Services 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.
Windows Azure Mobile Services Auth Data Notifications Logging & Diag Server Scripts Scheduler Scale
Resources Get a Windows Azure Free Trial Account http://www.windowsazure.com Videos, Tutorials, and More http://www.windowsazure.com/mobile Source code on GitHub https://github.com/WindowsAzure/azure-mobile-services Contact Details mobileservices@microsoft.com Feature Requests
API Authorization R ES T A PI Everyone S E C U R I T Y SC RI P T S App Key APP Key? *should only be used during dev Master Key? Admin 403 on deny *Passes App Key / Auth user rescritions
Authenticated Users R ES T A PI S E C U R I T Y SC RI P T S Provider Token APP Valid User ID + Token User ID + Auth Token