Building mobile back ends with
windows azure mobile services
Windows Azure Sydney User Group
June 2013
Aidan Casey
@AIDANJCASEY | acaseyblog.wordpress.com
Solutions architect @MYOB Australia
Agenda
BaaS overview
Windows Azure Mobile Services Features
- Storage
- Push Notifications
- Authentication & Authorisation
- Scheduler
- Diagnostics & Scale
How long does it take to build a mobile app?
weeks!
http://www.kinvey.com/blog/2086/how-long-does-it-take-to-build-a-mobile-app
Why so long?
Killer Idea
User
Experience
Store Data
Social
Integration
Push
Security
Scale
Versioning
API
Geo
Location
Analytics
Choose
Technology
Store Data
Social
Integration
Push
Security
Scale
Versioning
API
Geo
Location
Analytics
Backend as a Service (BaaS)
SDK’s
• Windows Store
• Windows Phone 8
• iOS
• Android
• JavaScript
github.com/WindowsAzure/azure-mobile-services
Demo
CREATING A NEW MOBILE SERVICES APP
Storage
Structured Storage
Windows Azure SQL Database
Dynamic schema on/off
Apps partitioned by schema
REST API generated per table (very data centric platform)
Access your data through the portal, SQL Management studio or REST API
JSON -> SQL data types
JSON value T-SQL type
Numeric values (integer, decimal, floating point) Float(53)
Boolean Bit
DateTime DateTimeOffset(3)
String Nvarchar(max)
Demo
USING THE JAVASCRIPT SDK
Server side Logic
Server Logic – node.js
node.js on small azure VM’s (azure websites infrastructure)
Server side pipeline hooks (interceptors)
Out of the box you have access to the following node packages
(June Release) - you now have access to NPM
request, console, push.*, tables, sql, statusCodes, azure, mssql
Bypassing SQL Server storage
1. Virtual Tables
2 Create Custom API
Notifications
Push Notifications
The global push object is used to send push notifications.
Success & Error Callbacks are provided
Method
push. apns Apple Push Notification Service iOS apps
push. gcm Google Cloud Messaging Android apps
push. mpns Microsoft Push Notification Service Windows Phone 8 apps
push. wns Windows Notification Services Windows Store apps
Push Notification Lifecycle
Demo
PUSH NOTIFICATIONS TO A WINDOWS STORE APP
Authentication & Authorisation
Authorisation
Table level authorization for CRUD operations
Everyone: any request by anyone is accepted.
Anyone with Application Key: app key distributed w/ the app (default)
Authenticated Users: users authenticated by Live Connect.
Scripts and Admins: registered scripts or requests via the master key
Application Key should not be used in production !
CLI & Diagnostics
Scheduler
Cool Party Add-Ins from Azure Store
Git publishing
10 Mobile
Services
1GB SQL Database
700 jobs a month
Resources
Official Videos & Tutorials
http://www.windowsazure.com/en-us/develop/mobile/
Real world Use Cases & black belt tips
http://chrisrisner.com/Common-Scenarios-with-Windows-Azure-Mobile-Services
Mr Azure Mobile Services (Josh Twist)
http://www.thejoyofcode.com/
Cloud Nick ( Nick Harris )
http://www.nickharris.net/
Building mobile back ends with windows azure mobile services

Building mobile back ends with windows azure mobile services

Editor's Notes

  • #6 Research by AYTM on behalf of Kinvey“we surveyed 100 mobile designers to discover how long they expected it would take to build core front- and backend components of an Android or iOS app”
  • #9 BaaS is a relatively recent development in cloud computing,with most BaaS startupsdating from 2011 or later.BaaS is distinct from these other services in that it specifically addresses the cloud-computing needs of web and mobile app developers by providing a unified means of connecting their apps to cloud services.The global BaaS market had an estimated value of $216.5 million in 2012.[5]
  • #11 It’s a back end for you mobile apps Giving you storage, authentication oAuth with various social networksServer side business logic with node.js interceptorsPush notifications to different mobile devicesSchedulerOther players include  Parse, Kinvey, Buddy, AppceleratorRelatively recent development in cloud computing started circa 2011
  • #12 All SDKs are open sourced on GitHubREST API for any other device….
  • #14 Both structured & unstructured storage availableWindows Azure SQL database with a dynamic schema or whatever you fancy!
  • #17 Cross-origin resource sharing (CORS) is a mechanism that allows a web page to make XMLHttpRequests to another domain.Such "cross-domain" requests would otherwise be forbidden by web browsers, per the same origin security policy. CORS defines a way in which the browser and the server can interact to determine whether or not to allow the cross-origin request.