Introducing Windows Azure. INTRODUCING CLOUD COMPUTING Windows Azure.
Windows Azure mobile services - Kolkata - 28 June 2015
-
Upload
kunal-chowdhury -
Category
Technology
-
view
174 -
download
2
Transcript of Windows Azure mobile services - Kolkata - 28 June 2015
Azure Mobile Services- a backend for your mobile app in minutes
Kunal Chowdhury
About Me
Kunal Chowdhurywww.kunal-chowdhury.com
Microsoft MVP (Windows Platform Development)Telerik Developer Expert
twitter.com/kunal2383
facebook.com/blog.kunal
Getting Started- quick introduction to the platform
why is mobile so important?
Enterprises want to manage internal mobile apps and consumer facing event or product-specific mobile apps from the same portal as core LOB apps.
Small Businesses require solutions that accelerate development time and decrease development costs.
Developers shouldn’t have to constantly reinvent the wheel and reproduce common backend functionality.
Consumers expect a continuous experience across all devices.
App DevelopmentChallenges
Windows Azure Mobile Services addresses each of those challenges.
Windows Azure Mobile
Services accelerates connected
client application development by
streamlining common backend tasks
like structuring storage,
authenticating users, and sending
push notifications.
What is Windows Azure Mobile Services?
Data
Notifications
Auth
Server Logic
Scale
Logging
Diagnostics
Key Scenarios
Make your app engaging and dynamicPush notifications and Live Tiles is the premier way to engage your customers. Make your app engaging and dynamic using Mobile Services Push.
Rapid DevelopmentTime is money. Get your app up and running sooner when you use Mobile Services to configure a secure backend in less than five minutes.
Make your app socialWhether your customers use Google, Facebook, Twitter or Microsoft Account, no matter what devices they run your app on, with Mobile Services you can make your app social and personable fast.
3
Connected Apps
Windows StoreiOSAndroid
Windows Phone 8iOSAndroidHTML 5/JS
SDKs
Data in the Cloud
SQL Table Blob
User Authentication
Facebook Twitter Microsoft Google
Push Notifications
WNS & APNS GCMMPNS
Server-Side Scripts
&
Scheduler
Basic Features
Supported Platforms
iOSWindows 8 Windows Phone 8 AndroidHTML5 & Javascript
SQL Database & Tables
Windows Azure Mobile Services Architecture
Nod
e.js
Windows Azure Mobile Service
Azure SQL Database
Client SDK & API
Client App
Data Services (CRUD) Authentication Services Push Notifications
Windows 8 Windows Phone Apple iOS Android HTML5/JS
Windows 8 Windows Phone Apple iOS Android HTML5/JS REST/HTTP
REST API
Monitoring and Logging 3rd Party Services
Server Side Scripts
Nod
e.js
SQL Database & Tables
DATA STORAGE SERVICES
Windows Azure Mobile Service
Azure SQL Database
Client SDK & API
Client App
Data Services (CRUD) Authentication Services Push Notifications
Windows 8 Windows Phone Apple iOS Android HTML5/JS
Windows 8 Windows Phone Apple iOS Android HTML5/JS REST/HTTP
REST API
Monitoring and Logging 3rd Party Services
Server Side Scripts
Client SDK Simplifies This
Mobile Services Data WORKFLOW
Insert script
Update script
Delete script
Read script
Node.JS Scripts
Some JSON Object{ Timestamp=“…”, Location=“…” }
REST
ove
r HTT
P
Dynamic Schema
Design First
Code First (Default)
Push Notifications
Insert, Update, Delete, Read on a Table
Automatic or Manual Server ScriptAn Event
Script Runs in the Azure Mobile Service
WindowsPhone 8
MPNS
iOS
APNS
Android
GCM
Windows 8
WNS
Push Notifications1. Request Channel URI2. Register with your Cloud Service3. Authenticate and Push Notification
Push Notifications- Integrates with WNS (and MPNS, APNS, or GCM)
- Toast, Tile, Badge and Raw notifications
- Portal captures WNS client secret and package SID
- push.wns* provides:- Clean object model to compose notifications- Auth against WNS for you
Authentication- Out of the box support for Microsoft Account, Facebook,
Twitter and Google
- Table level permissions for each CRUD operation Everyone Anyone with Application Key Only Authenticated users Only Scripts and Admins
- More granular control with server-side scriptsid or undefined if not authenticated
Authentication• To enable authentication, you must first
register your app with one or more of these identity providers and then configure your mobile service.
• You must also add authentication code to your app.
• When a user login is authenticated by Mobile Services, the value of the userId property on the user object passed to server scripts is set to a value that uniquely identifies a user. This value can then be used to authorize access to data.
Azure Management Portal- quick introduction to the platform
Dashboard• Quick glance
• Displays relevant mobile service information, including the service URL, status, location, database and subscription
• Usage Timeline:
• Displays a scalable chart of CPU time, API calls and data reads over a specific period of time.
• Usage Overview:
• Displays an overview of the total compute time and storage used by this mobile service
• Manage Keys
• Manage Keys
• Delete
• Delete the Mobile Service
Data• In Windows Azure Mobile Services, data is
stored in tables, which are maintained in the Windows Azure SQL Database that is associated with your mobile service.
• Click the Create button to add a new table to your mobile service.
• By default, you don’t need to predefine the schema of tables in your database.
• Mobile Services automatically add columns to a table based on the data you insert. To change this dynamic schema behavior, use the Dynamic Schema setting on the Configure tab.
• To browse data, manage permissions and indexes on tables, or add server scripts, click on a table in the list.
• To delete a table, click to select a table row, and then click Delete.
Browse• The Browse tab lets you browse data rows
in a selected table.
• Click the forward and back arrows to navigate through multiple pages of data.
• Click on table names in the left navigation bar to switch between tables.
• Click on the large left arrow to go back to the Data tab.
Script• Mobile Services enables you to register
JavaScript code to be executed by the service when an insert, update, delete, or read operation occurs against a specific table.
• For each table there are 4 CRUD operations (insert, read, update, del)
• These scripts provide the ability to inject business logic into table operation, stop an operation from taking place, change or enrich values supplied to the operation or change the results.
• For authenticated clients, you can also perform user-specific authorizations based on the userId value of the supplied user object.
Columns• To delete columns, click the column and then click
Delete.
• To add additional columns to the table, simply send an insert request including the new properties from your app with dynamic schema enabled.
• Once a column is created, its data type cannot be changed by Mobile Services.
• Insert or update operations fail when the type of a property in the JSON object cannot be converted to the type of the equivalent column in the table.
• You can improve the performance of queries by defining an index on the table.
• To add a column to the index, select the column and click Set as Index.
Permissions• Mobile Services enables you to set the following permissions
on table operations:
• Everyone: request for the operation against the table is accepted. This option leaves your data wide-open for everyone to access.
• Anybody with the Application Key: The application key is required to perform the operation. The application key is distributed with the application. Note: Because this key is not securely distributed, it cannot be considered a security token. To secure access to your mobile service data, you must instead authenticate users before accessing.
• Only Authenticated Users: Only authenticated users are permitted to perform the operation. Scripts can be used to further restrict access to tables based on an authenticated user.
• Only Scripts and Admins: The operation requires the service master key, which limits the operation only to registered scripts or to administrator accounts
Push• Mobile Services can send push notifications to your apps.
• The way that you configure and send push notifications depends on your app.
• You can send push notifications to the following applications:
• Windows Store app by using the Windows Push Notification Service (WNS). To send push notifications to your app, you must configure your mobile service to work with WNS.
• iPhone and iPad apps by using the Apple Push Notification Service (APNS). To send push notifications to your app, you must configure your mobile service to work with APNS.
• Android: You can send push notifications to Android apps by using the Google Cloud Messaging (GCM) service. To send push notifications to your app, you must configure your mobile service to work with GCM.
• Windows Phone 8 app by using the Microsoft Push Notification Service (MPNS). Mobile Services does not require you to register your Windows Phone 8 app to send push notifications.
Identity• Mobile Services integrates with the following
identity providers to make it easy to authenticate users from your app: • Microsoft Account • Facebook login • Twitter login • Google login
• To enable authentication, you must first register your app with one or more of these identity providers and then configure your mobile service.
• You must also add authentication code to your app.
• When a user login is authenticated by Mobile Services, the value of the userId property on the user object passed to server scripts is set to a value that uniquely identifies a user. This value can then be used to authorize access to data.
My blog: www.kunal-chowdhury.com