With Windows Azure Mobile Services, Microsoft has made available an amazing service to easily build mobile solutions on a solid API, offering a lot of important components out of the box.
Starting from data running on a Windows Azure SQL Database, exposed through a REST API and supported by javascript-enabled server side logic and scheduled tasks, a mobile backend can be set up in only minutes. Adding the extra power of authentication using various well known identity providers and the free notification services to serve push notifications make it a solid solution for all mobile platforms, including Android, iOS, Windows Phone and Windows 8.
In this session we will show you how Windows Azure Mobile Services can already be applied in real world architectures and projects, even while it is still in preview. We will talk through a few Windows 8 and Windows Phone apps, already or soon available in the Windows Store and we will show you how to combine the SDK and REST possibilities offered by the service to build solid solutions on all mobile platforms.
2. • Kristof Rennen
• Managing Partner / Solution Architect at AppStory
• Microsoft Extended Experts Team Member
• Crew Member of Azug, the Belgian Windows Azure User
Group
• Windows Azure Insider / Mobile Services Advisory Board
Member
• @kristofrennen / @AppStoryBe
• kristof.rennen@appstory.be
3. Over 100 community-led Windows Azure training events worldwide!
http://globalwindowsazure.azurewebsites.net
4. • Mobile Services? • Advice from the trenches
• Inside data
• Being secure
• Real world scenarios • Wrap up & conclusion
6. • Powerful building blocks
• All needed components available out of the box
• Solid back ends in seconds
• Cross platform support for all major platforms:
Windows 8, Windows Phone, Android, iOS, HTML5
• Fully REST capable if needed
• Focus on apps, not on infrastructure
9. • Windows Azure SQL Database
• Create tables through portal or API
• Dynamic schema
• One database, multiple services possible
• Security is schema based
• DBA user only to create new service, restricted
user for further access
• Throttling and failures are handled and retried
10. • Relations (and therefor joins) are not possible
• But … views are “possible” but not advised
• You can still aggregate data from multiple tables
11. • Server scripts can execute http requests
• Any http based service can be called
14. • Think of it as the Application Identifier
• Only remains private during development
• Don’t rely on it to remain private in production
• Don’t use it as a security mechanism
• Can still be used as a tracking mechanism
15. • Everyone • Only Authenticated Users
• Anybody with the • Only Scripts and Admins
Application Key
17. • Apps have data which can be shared over multiple
devices & platforms: settings, user data, …
• Mobile Services can easily be the store in between
18. • Windows 8 and Windows Phone share settings
and session favorites Favorites
(3 Instances)
(Microsoft Account) (1GB Web)
Windows 8
Windows XAML + C#
MVVM
Phone 7/8
WAMS SDK
XAML + C#
Live SDK
REST
Filters
19. • Data comes from many sources: databases, feeds,
CMS, website, …
• You have a solution or app that visualizes all this
data
• Risk of tightly coupling to various sources
• Concerns
20. • Cross platform apps visualizing training data from:
Partner Training Microsoft Partner Microsoft Innovation Developer & Platform
Framework Network Center Evangelism ?
(Sharepoint + XML) (SQL Database) (XML Feed) (XML Feed)
Integration Services
(Windows Azure Worker Role / Mobile Services Scheduler / )
Upsert
• One Data Model
• One “interface”
• Reusability Windows 8 Windows Phone Android iOS Web
21. • Live SDK and Mobile Services integrate well
• Except … if you use Live SDK on one app and
Mobile Services on the other > token mismatch
• But ... there is a pretty “simple” solution
22. • Windows 8 uses Mobile Services authentication
using Live directly
• Windows Phone uses Live SDK authentication
Auth Live SDK
Windows
Live API
Live Access Token
Live Access Token
Auth Mobile Service SDK Mobile Services Access Token Custom Read Script
24. • Multiple mobile services, one database
• Each mobile service has its own database user
• Use dynamic schema
• Use views for complex queries
• Duplicate and optimize data if needed
• Other data sources are possible: table storage,
queues, another API, …
25. • Version your server side scripts
• Automate script deployment using Powershell
• Test your scripts
• Use DEV, TEST and PROD environments
26. • Abstract the implementation and loosely couple it
• Make sure you can grow into it
• Reuse the abstraction by using IoC and DI
• Consider PCLs to optimize reusability
• Think about multi tenancy
• Standard API concerns and best practices still
apply
27.
28. Over 60 community-led Windows Azure training events worldwide!
http://globalwindowsazure.azurewebsites.net