SlideShare a Scribd company logo
Going Mobile with
Azure Mobile Services
Eran Stiller
Cloud Division Leader
Senior Software Architect
erans@codevalue.net
http://stiller.co.il/blog/
http://codevalue.net
Agenda
Frontal Session
Introduction to Microsoft Azure
Introduction to Azure Mobile Services
JavaScript vs .NET
Data Storage
Authentication
Offline Access & Synchronization
Push Notifications
SignalR
Source Control
Azure App Service
Hands On Lab
About Me
Cloud Division Leader & Co-Founder at CodeValue
Ltd.
Software architect, consultant and instructor
More than 10 years of hands-on experience
.NET and Native Windows Programming
Expert in large-scale, server-side, highly-concurrent
systems
Active member of Microsoft Azure Advisors group
About CodeValue
A leading software company
~130 employees: more than 120 technology experts
Provides high quality software development solutions
Turn-Key projects
Software development and consultation
Tailor-made courses and training
Fields of expertise include:
Desktop & LOB applications
Cloud Computing
Advanced Mobile & Web Technologies
User Experience (UX) & User Interface (UI)
Application Lifecycle Management (ALM) and DevOps
Embedded & IoT
About OzCode
An innovative debugging extension for Visual-Studio
Simplify & visualize complex statements
Compare objects and collections
Search and filter collections
Focus on relevant data
http://oz-code.com
Israeli Azure Developer Community
Curious about Azure? Join us!
Meet every two months at Microsoft Ra’anana
Next meeting – 21/10/2015
Agenda –
Azure Service Fabric In-Depth
http://www.meetup.com/IsraeliAzureDevelopers
https://www.facebook.com/IsraeliAzureDevelopers
Microsoft Azure
Why the Cloud?
Rapidly setup environments to drive business
priorities
Scale to meet peak demands
Increase daily activities, efficiency and reduced cost.
Why the Cloud?
On Premises
Youscale,makeresilientandmanage
Infrastructure
(as a Service)
Managedbyvendor
Youscale,make
resilient&manage
Platform
(as a Service)
Scale,resilienceand
managementbyvendor
Youmanage
Software
(as a Service)
Applications
Scale,resilienceand
managementbyvendor
Azure
footprint
Microsoft Azure – 17 Regions Worldwide in Mid 2015
Data Centers
Regional Partners
Fortune 500 using Azure
>80% >300k
Active websites
More than
1,000,000
SQL Databases in Azure
>30TRILLION
storage objects >500MILLION
AAD users
>13 BILLION
authentication/wk
>3
MILLION
requests/sec
>1.65MILLION
Developers registered
with Visual Studio Online
Microsoft Azure (Mid 2015)
Microsoft Azure Services
Data
&Storage
Web
&Mobile
Compute
SQL Database
App
Service
Virtual
Machines
Media&CDN
Media
Services
CDN
Developer
Services
DocumentDB Redis Cache
Cloud Services Batch Service Fabric
Networking
Virtual
Network ExpressRoute
Traffic
Manager
StorSimpleSearchStorage
Identity
&Access
Azure Active
Directory
Multi-Factor
Authent
API
Management
Notification
Hubs
Mobile
Engagement
Visual Studio
Online
Application
Insights
Management
Scheduler Automation
Operational
Insights Key Vault
Analytics
&IoT
HDInsight
Machine
Learning
Stream
Analytics Data Factory Event Hubs
Hybrid
Integration
BizTalk
Services Service Bus Backup Site Recovery
Web App Mobile App API App Logic App
Blobs Tables Queues Files
Marketplace
…
Data Lake
Data
Warehouse
RemoteApp DNS
Application
Gateway
Microsoft Azure Services
Data
&Storage
Web
&Mobile
Compute
SQL Database
App
Service
Virtual
Machines
Media&CDN
Media
Services
CDN
Developer
Services
DocumentDB Redis Cache
Cloud Services Batch Service Fabric
Networking
Virtual
Network ExpressRoute
Traffic
Manager
StorSimpleSearchStorage
Identity
&Access
Azure Active
Directory
Multi-Factor
Authent
API
Management
Notification
Hubs
Mobile
Engagement
Visual Studio
Online
Application
Insights
Management
Scheduler Automation
Operational
Insights Key Vault
Analytics
&IoT
HDInsight
Machine
Learning
Stream
Analytics Data Factory Event Hubs
Hybrid
Integration
BizTalk
Services Service Bus Backup Site Recovery
Web App Mobile App API App Logic App
Blobs Tables Queues Files
Marketplace
…
Data Lake
Data
Warehouse
RemoteApp DNS
Application
Gateway
Demo
Azure Mobile Services
Azure Mobile Services
Azure Mobile Services
A Turnkey Backend for Employee Mobile Apps
Deliver Native & Cross Platform Apps
Enable Corporate Single Sign-On
Integrate w/ O365 and On-Premise Enterprise
Systems
Connect To Any Data Source
Enable Offline and Real-Time Sync
Leverage Your Existing Skills with .NET Web API
Supported Platforms
ArchitecturePortal
Zumo
Resource
Provider
Zumo
Mgmt DB Site 1
Zumo
Runtime
SQL 1
Scheduler
RDFE
Site 2 Site N
Azure
SDK
3rd party
SDKS
SQL 2 SQL N
AzureLBARR
App
ScriptsWin8
Device
iPhone
JavaScript vs .NET
JavaScript
Based on server side scripts
Node.JS Scripts
Intercept CRUD requests to tables
Passes through to SQL by default
Fully customizable logic flow
Edit in Azure Portal or via GIT integration
Node Modules
Extensibility through numerous included modules
Can use NPM to install any available node package
.NET
Based on ASP.NET Web API 2
Full .NET support
Intercept CRUD requests to tables
Custom APIs available using Web API 2
Fully customizable logic flow
Standard VS tooling & support
Local debugging
Standard MS Deploy to Azure
Demo
Which Should I Use?
Whichever you know better!
If you’re a .NET dev – go with .NET!
If you’re a JavaScript type of person – go with Node.JS!
Most features are available in both flavors
Some miniature differences apply
But go with what you know
Data Storage
New Data Model
TableController
DataManager
DTO
DTO
Mobile ServiceDevice
SQL Database
BYOD
MongoDB
Table Storage
Azure SQL DB
Out-of-the-box implementation
Easily store relational data
Fully integrated with Mobile Services
Azure Table Storage
Azure Table Storage is a highly-scalable cost-
effective key-value data store
NoSQL
Every item is addressable by combination of:
Partition Key
Row Key
Store non-relational data
.NET backend only
Azure Blob Storage
Storing Blobs in a database is inefficient
BLOB storage is much cheaper and scalable
Can manually integrate the backend (C#/JavaScript)
with Blob storage to store blobs
Only store a reference to the blob (URI) in the DB
Existing SQL Database
TableController
DataManager
DTO
DTO
Mobile ServiceDevice
Model
AutoMapper
SQL Azure/BYOD
Existing
Tables
System
Properties
Table
On-Premise SQL Database
Hybrid Connections
Microsoft Azure Your Enterprise
Connection string points to
My-Database:1433
Hybrid
Connection
Manager
My-Database
1433
The REST API
Action HTTP Verb URL Suffix
Create POST /TodoItem
Read GET /TodoItem?$filter=id%3D42
Update PATCH /TodoItem/id
Delete DELETE /TodoItem/id
https://Mobileservice.azure-mobile.net/tables/*
Demo
Authentication & Authorization
Social Authentication
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 code
User Level: Admin, Authenticated, Anonymous
User Id: Id or undefined if not authenticated
Social Authentication
APP
R
E
S
T
A
P
I
S
C
R
I
P
T
S
S
E
C
U
R
I
T
Y
Valid
User ID
+
Token
User Auth Flow (Server)
GOOGLE
FACEBOOK
TWITTER
MOBILE SERVICE
DEVICE
MICROSOFT
User Auth Flow (Client)
GOOGLE
FACEBOOK
TWITTER
MOBILE SERVICE
DEVICE
MICROSOFT
Enterprise Authentication
Use Azure Active Directory
Extend line-of-business to mobile
Bring turn-key login experience with corporate
credentials to mobile developers
Enable applications built around organizational
structures
Active Directory Authentication Library (ADAL)
Facilitates login to AAD-protected resources
Provides single sign-on to multiple enterprise
resources
Available for Windows Store, iOS, Android &
Xamarin
Base ADAL + Mobile Services Flow
1. Client app uses ADAL to initiate login, user enters
credentials which are sent to AAD
2. AAD returns an Access Token / Refresh Token pair
for the mobile service to ADAL
3. The client passes the Access Token to the mobile
service, exchanges for the Mobile Services token
for a continued session
3
2
1
Access Resource on Behalf of the User
1. Mobile Service passes Access Token to AAD along
with a requested resource URI and its Client ID /
Client Secret
2. AAD sends back an Access Token / Refresh Token
pair for the remote resource
3. Mobile Service talks to the remote resource on
behalf of the logged-in user
1 2
3
API Authorization
R
E
S
T
A
P
I
S
C
R
I
P
T
S
S
E
C
U
R
I
T
YAdmin
App Key
Everyone
APP Key?
Master
Key?403 on
deny
Demo
Offline Access & Synchronization
Offline Data Sync
The best mobile apps handle network interruptions
gracefully
Adding offline sync to an app is usually hard
With Azure Mobile App, it’s easy
Why Use Mobile Offline Sync?
Improve app responsiveness by caching server data
locally on the device
Make apps resilient against intermittent network
connectivity
Allow end-users to create and modify data even
when there is no network access
Sync data across multiple devices
Detect and handle conflicts when the same record is
modified by more than one client
How it Works?
Access data from Mobile Services tables even when
app is offline
Keep a local queue of Create, Update, Delete
operations and synchronize with server when app is
back online
Detect conflicts when same item is changed both
locally and on server
Use soft delete to remove deleted records from
client data stores
Can use push notifications to trigger client sync
How it Works?
TableController
(with optimistic
concurrency)
Mobile ServiceDevice
SQL Database
BYOD
MongoDB
Table Storage
SQLite
Explicit Push/Pull
Conflict resolution
Detect Conflicts with Optimistic Concurrency
▲, 1■, 2
▲, 1
▲, 1
●, 2
■, 2
Device 1
Server
Device 2
▲, 1 ▲, 1
▲, 1 ▲, 1
▲, 1
■, 2
▲, 1
Create
Fetch
Update
Update
■, 2✘
Demo
Push Notifications
Push is Transforming Businesses
Broadcast breaking news to millions
of customers using their
preferences
Send notifications based on
account changes or actions
Engage customer to improve your
brand, customer satisfaction, and
business metrics
Increase employee productivity
and
responsiveness
Push Notification 101
Register device handle at app launch
1. Client app retrieves handle from Platform Notification
Service (PNS)
2. Client app sends handle to your custom backend
Send Notification
3. Your backend connects to PNS and requests push
Your code has to map between logical users and device
handles
4. PNS pushes notification to device
Maintain backend device handles
5. Your code must delete expired handles when PNS rejects
them
6. Your code must map between logical users and device
handles
Platform
Notification
Service
App back-end
Client app
1
2
3
4
5
6
Azure Notification Hub
Register device handle at app launch
1. Client app retrieves handle from Platform Notification Service
2. Client sends handle to your backend
Backend registers with Notification Hub using tags to represent
logical users and groups
Send Notification
3. Backend sends request to Notification Hub using a tag
Notification Hub manages scale
Notification Hub maps logical users/groups to device handles
4. Notification Hub delivers notifications to matching devices via PNS
Maintain backend device handles
5. Notification Hub deletes expired handles when PNS rejects them
6. Notification Hub maintains mapping between logical users/groups
and device handles
PNS
App back-end
Client app
1
2
2
4
5
6
Notification
Hub
3
4
Advantages of Notification Hub
X-plat: one API to notify on any mobile platform
Backend can be on-prem or in the cloud, .NET, Java, PHP,
Node, you name it
Support iOS, Android, Windows Phone, Windows, Kindle
Avoid storing device information in your tables
Work with logical users and segments
Personalization and localization
Templates
Broadcast at scale, multicast, unicast
Rich Telemetry
Push Notification Patterns
Notify a single logical user
Broadcast to a segment based on interest
Tag Expressions
Notify all users
Notify all users, in batches
Personalization and localization
Template Expressions
Geo-Targeting Tags
Demo
SignalR
SignalR
A library for ASP.NET developers
Simplifies the process of adding real-time web
functionality to applications
Stock tickers
Notifications
Any real-time server to client informations
SDKs are available in various platforms
Azure Mobile Services allows integrating SignalR
communication
Easily integrate web based clients
.NET Backend Only
SignalR
SignalR scaling is handled automatically by Azure
Mobile Services
Demo
Source Control
Script Source Control (JavaScript)
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
MSDeploy (.NET)
.NET backend deployment is performed via standard
MSDeploy
Same as for IIS & Azure Web-Apps
Several deployment options
Directly from Visual-Studio
Right Click & Publish
Command Line Interface
Suitable for automation scenarios
Demo
Azure App Service
Azure App Service: One Integrated Offering
API Apps
Easily build and consume
APIs in the cloud
Web Apps
Web apps that scale
with your business
Mobile Apps
Build Mobile apps
for any device
Logic Apps
Automate business process
across SaaS and on-premises
Azure App Service (Runtime View)
API Apps
Web Apps
Mobile Apps
Logic Apps
Azure App Service
Create web and mobile experiences that share data
access and business logic
Automate business processes with logic apps
Build custom APIs or consume connectors from
Marketplace
One common billing model for all of your App
Services
Use a common Gateway to authenticate
Azure Mobile App
RESTAPI
Offline
sync
Facebook Twitter Microsoft Google Azure Active
Directory
Windows
iOS
Android
HTML 5/JS
Xamarin
PhoneGap
Sencha
WindowsAndroid
Chrome
iOS OSX In-AppKindle
Backend code
SQL MongoTables O365 API Apps
Offline Sync
Azure Web Apps – Extended!
Richer monitoring and
alerting
Traffic manager
Custom CNAMEs
VNET and VPN
Backup and restore
More VM size and instance
options
In production A/B testing
Auto load-balance
Share capacity across Web and
Mobile
Staging slots
Validate changes in your staging
environment before publishing to
production
More DevOps features
Support for BitBucket and Visual
Studio Online; seamless integration
with GitHub
Web Jobs
Azure Mobile Apps vs. Azure Mobile Services
Mobile Services – in classic portal
Mobile Apps – preview portal
When Mobile Apps is GA, will have all the features
of Mobile Services
Your investment is safe!
Azure Mobile App is still in preview
New features will go into Mobile Apps
Azure Mobile Services is still supported
After GA, Microsoft to offer a seamless migration
experience
Migration
Even today (before GA), migration is quite smooth
Azure Mobile Apps is still not feature complete
Aug. & Sep. 2015 updates brought a lot of these
features to Azure Mobile Apps
Current migration steps are:
Replace the client SDK
Most code should compile smoothly
Replace various URLs and Attributes
Resolve issues mainly around user authentication
Scheduler is no longer supported – use WebJobs instead
And that’s about it…
Migration Instructions
Q
A
Q
A
Hands-On Lab
Chat Application
Summary
Azure Mobile Services
Mobile Services is a powerful Backend-as-a-Service
platform
Create a powerful backend using Web API or
Node.JS
Support for a wide range of different data stores
Authenticate using various identity providers
Offline data let’s us cater for all usage patterns
Easily send push notifications to various platforms
SignalR integration allows interfacing with Web
Applications
Azure Mobile Apps are the future
But our investment is safe
Resources
Official Documentation
Microsoft Azure Training Kit
Azure DevCamp
Microsoft Virtual Academy
Azure Mobile Apps @BUILD 2015
Migration from Azure Mobile Services to Azure
Mobile Apps
Azure Mobile Services SignalR Support
Q
A
Q
A
Azure Mobile Services Workshop

More Related Content

PDF
The parallel universes of DevOps and cloud developers
PPTX
DevOps in the Cloud
PPTX
2019 04 Containers - The secret to shipping cloud workloads
PPT
GigaSpaces CCF 4 Xap
PPTX
2019 05 - Exploring Container Offerings in Azure
PPT
Managing Software from Development to Deployment in the Cloud
PDF
DevOps in the Cloud with Microsoft Azure
PPTX
DevOps and Cloud Tips and Techniques to Revolutionize Your SDLC
The parallel universes of DevOps and cloud developers
DevOps in the Cloud
2019 04 Containers - The secret to shipping cloud workloads
GigaSpaces CCF 4 Xap
2019 05 - Exploring Container Offerings in Azure
Managing Software from Development to Deployment in the Cloud
DevOps in the Cloud with Microsoft Azure
DevOps and Cloud Tips and Techniques to Revolutionize Your SDLC

What's hot (15)

PPTX
DevOps: a story about automation, open source & the Cloud
PPTX
Jelastic for Hosting & MSP
DOCX
Resume - Keith Greene
PPTX
Cloud Native Application Development-build fast, low TCO, scalable & agile so...
PPTX
Using Azure DevOps to continuously build, test, and deploy containerized appl...
PPTX
Microsoft Tech Series 2019 - Azure DevOps
PDF
Building scalable applications using serverless on the cloud
PPTX
Kubernetes for .NET Developers
PPTX
DevOps for Azure
PDF
Using cloud native development to achieve digital transformation
PPTX
MS Insights Brazil 2015 containers and devops
PPTX
Build and use a DevOps driven Migration Pipeline
PDF
Jelastic - DevOps for Java with Docker Containers - Madrid 2015
PPTX
Infrastructure less development with Azure Service Fabric
PDF
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
DevOps: a story about automation, open source & the Cloud
Jelastic for Hosting & MSP
Resume - Keith Greene
Cloud Native Application Development-build fast, low TCO, scalable & agile so...
Using Azure DevOps to continuously build, test, and deploy containerized appl...
Microsoft Tech Series 2019 - Azure DevOps
Building scalable applications using serverless on the cloud
Kubernetes for .NET Developers
DevOps for Azure
Using cloud native development to achieve digital transformation
MS Insights Brazil 2015 containers and devops
Build and use a DevOps driven Migration Pipeline
Jelastic - DevOps for Java with Docker Containers - Madrid 2015
Infrastructure less development with Azure Service Fabric
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...
Ad

Similar to Azure Mobile Services Workshop (20)

PPTX
For loop summit - cheating the developer experience
PPTX
Azure-AD.pptx
PPTX
Microsoft Azure AD architecture and features
PPTX
Análisis de riesgos en Azure y protección de la información
PDF
BizSpark migreren naar de cloud
PPTX
Microsoft Azure Technical Overview
PPTX
SQL Server Data Services
PPTX
CTU June 2011 - Windows Azure App Fabric
PPTX
Azure Active Directory - An Introduction for Developers
PPTX
Wisconsin .NET UG - Windows Azure
PPTX
Sky High With Azure
PPTX
Understanding the Windows Azure Platform - Dec 2010
PDF
Build and Modernize Intelligent Apps​
PPT
Windows Azure for .NET Developers
PPT
Day Of Cloud - Windows Azure Platform
PDF
Azure Cloud Dev Camp - Introduction
PPTX
Azure Community Tour 2019 - AZUGDK
PPTX
Microsoft Azure
PDF
Azure from Rookie to DevStart
PPTX
Microsoft Azure Kimlik Yönetimi
For loop summit - cheating the developer experience
Azure-AD.pptx
Microsoft Azure AD architecture and features
Análisis de riesgos en Azure y protección de la información
BizSpark migreren naar de cloud
Microsoft Azure Technical Overview
SQL Server Data Services
CTU June 2011 - Windows Azure App Fabric
Azure Active Directory - An Introduction for Developers
Wisconsin .NET UG - Windows Azure
Sky High With Azure
Understanding the Windows Azure Platform - Dec 2010
Build and Modernize Intelligent Apps​
Windows Azure for .NET Developers
Day Of Cloud - Windows Azure Platform
Azure Cloud Dev Camp - Introduction
Azure Community Tour 2019 - AZUGDK
Microsoft Azure
Azure from Rookie to DevStart
Microsoft Azure Kimlik Yönetimi
Ad

More from Eran Stiller (20)

PDF
Architecting at Scale with the Advice Process
PDF
Application Evolution Strategy
PDF
Developing and Deploying Microservices with Project Tye
PDF
API Design in the Modern Era - Architecture Next 2020
PDF
Bot-Tender: A Chat Bot Walks into a Bar (2020)
PDF
Why Don’t You Understand Me? Build Intelligence into Your Apps
PPTX
Modern Microservices Architecture with Docker
PDF
Windows Containers - Microsoft Ignite The Tour
PDF
Architecting Multitenant SaaS Applications with Azure - Microsoft Ignite The ...
PDF
Bot Framework - Microsoft Ignite The Tour
PDF
It's a Serverless World
PDF
Keynote - From Monolith to Microservices - Lessons Learned in the Real World
PPTX
Architecting a Serverless IoT System in the Cloud
PDF
6 Lessons I Learned on my Journey from Monolith to Microservices
PPTX
IoT in Action Keynote - CodeValue
PDF
Net Conf Israel - Intro & Building Cloud Native Apps with .NET Core 3.0 and K...
PPTX
Create Your Own Serverless PKI with .NET & Azure Key Vault
PPTX
Cloud Native Development on Azure
PPTX
Today, the Cloud Is Your Advantage
PPTX
Build 2019 Recap
Architecting at Scale with the Advice Process
Application Evolution Strategy
Developing and Deploying Microservices with Project Tye
API Design in the Modern Era - Architecture Next 2020
Bot-Tender: A Chat Bot Walks into a Bar (2020)
Why Don’t You Understand Me? Build Intelligence into Your Apps
Modern Microservices Architecture with Docker
Windows Containers - Microsoft Ignite The Tour
Architecting Multitenant SaaS Applications with Azure - Microsoft Ignite The ...
Bot Framework - Microsoft Ignite The Tour
It's a Serverless World
Keynote - From Monolith to Microservices - Lessons Learned in the Real World
Architecting a Serverless IoT System in the Cloud
6 Lessons I Learned on my Journey from Monolith to Microservices
IoT in Action Keynote - CodeValue
Net Conf Israel - Intro & Building Cloud Native Apps with .NET Core 3.0 and K...
Create Your Own Serverless PKI with .NET & Azure Key Vault
Cloud Native Development on Azure
Today, the Cloud Is Your Advantage
Build 2019 Recap

Recently uploaded (20)

PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Nekopoi APK 2025 free lastest update
PDF
System and Network Administraation Chapter 3
How to Migrate SBCGlobal Email to Yahoo Easily
Wondershare Filmora 15 Crack With Activation Key [2025
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Design an Analysis of Algorithms II-SECS-1021-03
Adobe Illustrator 28.6 Crack My Vision of Vector Design
How Creative Agencies Leverage Project Management Software.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Navsoft: AI-Powered Business Solutions & Custom Software Development
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
ISO 45001 Occupational Health and Safety Management System
Design an Analysis of Algorithms I-SECS-1021-03
2025 Textile ERP Trends: SAP, Odoo & Oracle
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Which alternative to Crystal Reports is best for small or large businesses.pdf
top salesforce developer skills in 2025.pdf
Understanding Forklifts - TECH EHS Solution
Nekopoi APK 2025 free lastest update
System and Network Administraation Chapter 3

Azure Mobile Services Workshop

  • 1. Going Mobile with Azure Mobile Services Eran Stiller Cloud Division Leader Senior Software Architect erans@codevalue.net http://stiller.co.il/blog/ http://codevalue.net
  • 2. Agenda Frontal Session Introduction to Microsoft Azure Introduction to Azure Mobile Services JavaScript vs .NET Data Storage Authentication Offline Access & Synchronization Push Notifications SignalR Source Control Azure App Service Hands On Lab
  • 3. About Me Cloud Division Leader & Co-Founder at CodeValue Ltd. Software architect, consultant and instructor More than 10 years of hands-on experience .NET and Native Windows Programming Expert in large-scale, server-side, highly-concurrent systems Active member of Microsoft Azure Advisors group
  • 4. About CodeValue A leading software company ~130 employees: more than 120 technology experts Provides high quality software development solutions Turn-Key projects Software development and consultation Tailor-made courses and training Fields of expertise include: Desktop & LOB applications Cloud Computing Advanced Mobile & Web Technologies User Experience (UX) & User Interface (UI) Application Lifecycle Management (ALM) and DevOps Embedded & IoT
  • 5. About OzCode An innovative debugging extension for Visual-Studio Simplify & visualize complex statements Compare objects and collections Search and filter collections Focus on relevant data http://oz-code.com
  • 6. Israeli Azure Developer Community Curious about Azure? Join us! Meet every two months at Microsoft Ra’anana Next meeting – 21/10/2015 Agenda – Azure Service Fabric In-Depth http://www.meetup.com/IsraeliAzureDevelopers https://www.facebook.com/IsraeliAzureDevelopers
  • 8. Why the Cloud? Rapidly setup environments to drive business priorities Scale to meet peak demands Increase daily activities, efficiency and reduced cost.
  • 9. Why the Cloud? On Premises Youscale,makeresilientandmanage Infrastructure (as a Service) Managedbyvendor Youscale,make resilient&manage Platform (as a Service) Scale,resilienceand managementbyvendor Youmanage Software (as a Service) Applications Scale,resilienceand managementbyvendor
  • 10. Azure footprint Microsoft Azure – 17 Regions Worldwide in Mid 2015 Data Centers Regional Partners
  • 11. Fortune 500 using Azure >80% >300k Active websites More than 1,000,000 SQL Databases in Azure >30TRILLION storage objects >500MILLION AAD users >13 BILLION authentication/wk >3 MILLION requests/sec >1.65MILLION Developers registered with Visual Studio Online Microsoft Azure (Mid 2015)
  • 12. Microsoft Azure Services Data &Storage Web &Mobile Compute SQL Database App Service Virtual Machines Media&CDN Media Services CDN Developer Services DocumentDB Redis Cache Cloud Services Batch Service Fabric Networking Virtual Network ExpressRoute Traffic Manager StorSimpleSearchStorage Identity &Access Azure Active Directory Multi-Factor Authent API Management Notification Hubs Mobile Engagement Visual Studio Online Application Insights Management Scheduler Automation Operational Insights Key Vault Analytics &IoT HDInsight Machine Learning Stream Analytics Data Factory Event Hubs Hybrid Integration BizTalk Services Service Bus Backup Site Recovery Web App Mobile App API App Logic App Blobs Tables Queues Files Marketplace … Data Lake Data Warehouse RemoteApp DNS Application Gateway
  • 13. Microsoft Azure Services Data &Storage Web &Mobile Compute SQL Database App Service Virtual Machines Media&CDN Media Services CDN Developer Services DocumentDB Redis Cache Cloud Services Batch Service Fabric Networking Virtual Network ExpressRoute Traffic Manager StorSimpleSearchStorage Identity &Access Azure Active Directory Multi-Factor Authent API Management Notification Hubs Mobile Engagement Visual Studio Online Application Insights Management Scheduler Automation Operational Insights Key Vault Analytics &IoT HDInsight Machine Learning Stream Analytics Data Factory Event Hubs Hybrid Integration BizTalk Services Service Bus Backup Site Recovery Web App Mobile App API App Logic App Blobs Tables Queues Files Marketplace … Data Lake Data Warehouse RemoteApp DNS Application Gateway
  • 14. Demo
  • 17. Azure Mobile Services A Turnkey Backend for Employee Mobile Apps Deliver Native & Cross Platform Apps Enable Corporate Single Sign-On Integrate w/ O365 and On-Premise Enterprise Systems Connect To Any Data Source Enable Offline and Real-Time Sync Leverage Your Existing Skills with .NET Web API
  • 19. ArchitecturePortal Zumo Resource Provider Zumo Mgmt DB Site 1 Zumo Runtime SQL 1 Scheduler RDFE Site 2 Site N Azure SDK 3rd party SDKS SQL 2 SQL N AzureLBARR App ScriptsWin8 Device iPhone
  • 21. JavaScript Based on server side scripts Node.JS Scripts Intercept CRUD requests to tables Passes through to SQL by default Fully customizable logic flow Edit in Azure Portal or via GIT integration
  • 22. Node Modules Extensibility through numerous included modules Can use NPM to install any available node package
  • 23. .NET Based on ASP.NET Web API 2 Full .NET support Intercept CRUD requests to tables Custom APIs available using Web API 2 Fully customizable logic flow Standard VS tooling & support Local debugging Standard MS Deploy to Azure
  • 24. Demo
  • 25. Which Should I Use? Whichever you know better! If you’re a .NET dev – go with .NET! If you’re a JavaScript type of person – go with Node.JS! Most features are available in both flavors Some miniature differences apply But go with what you know
  • 27. New Data Model TableController DataManager DTO DTO Mobile ServiceDevice SQL Database BYOD MongoDB Table Storage
  • 28. Azure SQL DB Out-of-the-box implementation Easily store relational data Fully integrated with Mobile Services
  • 29. Azure Table Storage Azure Table Storage is a highly-scalable cost- effective key-value data store NoSQL Every item is addressable by combination of: Partition Key Row Key Store non-relational data .NET backend only
  • 30. Azure Blob Storage Storing Blobs in a database is inefficient BLOB storage is much cheaper and scalable Can manually integrate the backend (C#/JavaScript) with Blob storage to store blobs Only store a reference to the blob (URI) in the DB
  • 31. Existing SQL Database TableController DataManager DTO DTO Mobile ServiceDevice Model AutoMapper SQL Azure/BYOD Existing Tables System Properties Table
  • 32. On-Premise SQL Database Hybrid Connections Microsoft Azure Your Enterprise Connection string points to My-Database:1433 Hybrid Connection Manager My-Database 1433
  • 33. The REST API Action HTTP Verb URL Suffix Create POST /TodoItem Read GET /TodoItem?$filter=id%3D42 Update PATCH /TodoItem/id Delete DELETE /TodoItem/id https://Mobileservice.azure-mobile.net/tables/*
  • 34. Demo
  • 36. Social Authentication 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 code User Level: Admin, Authenticated, Anonymous User Id: Id or undefined if not authenticated
  • 38. User Auth Flow (Server) GOOGLE FACEBOOK TWITTER MOBILE SERVICE DEVICE MICROSOFT
  • 39. User Auth Flow (Client) GOOGLE FACEBOOK TWITTER MOBILE SERVICE DEVICE MICROSOFT
  • 40. Enterprise Authentication Use Azure Active Directory Extend line-of-business to mobile Bring turn-key login experience with corporate credentials to mobile developers Enable applications built around organizational structures
  • 41. Active Directory Authentication Library (ADAL) Facilitates login to AAD-protected resources Provides single sign-on to multiple enterprise resources Available for Windows Store, iOS, Android & Xamarin
  • 42. Base ADAL + Mobile Services Flow 1. Client app uses ADAL to initiate login, user enters credentials which are sent to AAD 2. AAD returns an Access Token / Refresh Token pair for the mobile service to ADAL 3. The client passes the Access Token to the mobile service, exchanges for the Mobile Services token for a continued session 3 2 1
  • 43. Access Resource on Behalf of the User 1. Mobile Service passes Access Token to AAD along with a requested resource URI and its Client ID / Client Secret 2. AAD sends back an Access Token / Refresh Token pair for the remote resource 3. Mobile Service talks to the remote resource on behalf of the logged-in user 1 2 3
  • 45. Demo
  • 46. Offline Access & Synchronization
  • 47. Offline Data Sync The best mobile apps handle network interruptions gracefully Adding offline sync to an app is usually hard With Azure Mobile App, it’s easy
  • 48. Why Use Mobile Offline Sync? Improve app responsiveness by caching server data locally on the device Make apps resilient against intermittent network connectivity Allow end-users to create and modify data even when there is no network access Sync data across multiple devices Detect and handle conflicts when the same record is modified by more than one client
  • 49. How it Works? Access data from Mobile Services tables even when app is offline Keep a local queue of Create, Update, Delete operations and synchronize with server when app is back online Detect conflicts when same item is changed both locally and on server Use soft delete to remove deleted records from client data stores Can use push notifications to trigger client sync
  • 50. How it Works? TableController (with optimistic concurrency) Mobile ServiceDevice SQL Database BYOD MongoDB Table Storage SQLite Explicit Push/Pull Conflict resolution
  • 51. Detect Conflicts with Optimistic Concurrency ▲, 1■, 2 ▲, 1 ▲, 1 ●, 2 ■, 2 Device 1 Server Device 2 ▲, 1 ▲, 1 ▲, 1 ▲, 1 ▲, 1 ■, 2 ▲, 1 Create Fetch Update Update ■, 2✘
  • 52. Demo
  • 54. Push is Transforming Businesses Broadcast breaking news to millions of customers using their preferences Send notifications based on account changes or actions Engage customer to improve your brand, customer satisfaction, and business metrics Increase employee productivity and responsiveness
  • 55. Push Notification 101 Register device handle at app launch 1. Client app retrieves handle from Platform Notification Service (PNS) 2. Client app sends handle to your custom backend Send Notification 3. Your backend connects to PNS and requests push Your code has to map between logical users and device handles 4. PNS pushes notification to device Maintain backend device handles 5. Your code must delete expired handles when PNS rejects them 6. Your code must map between logical users and device handles Platform Notification Service App back-end Client app 1 2 3 4 5 6
  • 56. Azure Notification Hub Register device handle at app launch 1. Client app retrieves handle from Platform Notification Service 2. Client sends handle to your backend Backend registers with Notification Hub using tags to represent logical users and groups Send Notification 3. Backend sends request to Notification Hub using a tag Notification Hub manages scale Notification Hub maps logical users/groups to device handles 4. Notification Hub delivers notifications to matching devices via PNS Maintain backend device handles 5. Notification Hub deletes expired handles when PNS rejects them 6. Notification Hub maintains mapping between logical users/groups and device handles PNS App back-end Client app 1 2 2 4 5 6 Notification Hub 3 4
  • 57. Advantages of Notification Hub X-plat: one API to notify on any mobile platform Backend can be on-prem or in the cloud, .NET, Java, PHP, Node, you name it Support iOS, Android, Windows Phone, Windows, Kindle Avoid storing device information in your tables Work with logical users and segments Personalization and localization Templates Broadcast at scale, multicast, unicast Rich Telemetry
  • 58. Push Notification Patterns Notify a single logical user Broadcast to a segment based on interest Tag Expressions Notify all users Notify all users, in batches Personalization and localization Template Expressions Geo-Targeting Tags
  • 59. Demo
  • 61. SignalR A library for ASP.NET developers Simplifies the process of adding real-time web functionality to applications Stock tickers Notifications Any real-time server to client informations SDKs are available in various platforms Azure Mobile Services allows integrating SignalR communication Easily integrate web based clients .NET Backend Only
  • 62. SignalR SignalR scaling is handled automatically by Azure Mobile Services
  • 63. Demo
  • 65. Script Source Control (JavaScript) 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
  • 66. MSDeploy (.NET) .NET backend deployment is performed via standard MSDeploy Same as for IIS & Azure Web-Apps Several deployment options Directly from Visual-Studio Right Click & Publish Command Line Interface Suitable for automation scenarios
  • 67. Demo
  • 69. Azure App Service: One Integrated Offering API Apps Easily build and consume APIs in the cloud Web Apps Web apps that scale with your business Mobile Apps Build Mobile apps for any device Logic Apps Automate business process across SaaS and on-premises
  • 70. Azure App Service (Runtime View) API Apps Web Apps Mobile Apps Logic Apps
  • 71. Azure App Service Create web and mobile experiences that share data access and business logic Automate business processes with logic apps Build custom APIs or consume connectors from Marketplace One common billing model for all of your App Services Use a common Gateway to authenticate
  • 72. Azure Mobile App RESTAPI Offline sync Facebook Twitter Microsoft Google Azure Active Directory Windows iOS Android HTML 5/JS Xamarin PhoneGap Sencha WindowsAndroid Chrome iOS OSX In-AppKindle Backend code SQL MongoTables O365 API Apps Offline Sync
  • 73. Azure Web Apps – Extended! Richer monitoring and alerting Traffic manager Custom CNAMEs VNET and VPN Backup and restore More VM size and instance options In production A/B testing Auto load-balance Share capacity across Web and Mobile Staging slots Validate changes in your staging environment before publishing to production More DevOps features Support for BitBucket and Visual Studio Online; seamless integration with GitHub Web Jobs
  • 74. Azure Mobile Apps vs. Azure Mobile Services Mobile Services – in classic portal Mobile Apps – preview portal When Mobile Apps is GA, will have all the features of Mobile Services Your investment is safe! Azure Mobile App is still in preview New features will go into Mobile Apps Azure Mobile Services is still supported After GA, Microsoft to offer a seamless migration experience
  • 75. Migration Even today (before GA), migration is quite smooth Azure Mobile Apps is still not feature complete Aug. & Sep. 2015 updates brought a lot of these features to Azure Mobile Apps Current migration steps are: Replace the client SDK Most code should compile smoothly Replace various URLs and Attributes Resolve issues mainly around user authentication Scheduler is no longer supported – use WebJobs instead And that’s about it… Migration Instructions
  • 80. Azure Mobile Services Mobile Services is a powerful Backend-as-a-Service platform Create a powerful backend using Web API or Node.JS Support for a wide range of different data stores Authenticate using various identity providers Offline data let’s us cater for all usage patterns Easily send push notifications to various platforms SignalR integration allows interfacing with Web Applications Azure Mobile Apps are the future But our investment is safe
  • 81. Resources Official Documentation Microsoft Azure Training Kit Azure DevCamp Microsoft Virtual Academy Azure Mobile Apps @BUILD 2015 Migration from Azure Mobile Services to Azure Mobile Apps Azure Mobile Services SignalR Support

Editor's Notes

  • #11: 24 regions as of Oct. 2015 (more than AWS and Google combined)
  • #15: Azure Portal Demo
  • #17: Slide Objectives: Explain what a Backend-as-a-service is Explain the features (at a high level) that Mobile Services offers Transition: Let’s answer the question, what is Mobile Services? Speaking Points: Mobile Services is a Backend-as-a-Service (BaaS). Instead of coding, testing, deploying, and maintaining your own backend, you spin up a Mobile Service and can instantly take advantage of a ton of great features. These features include: Data storage powered by SQL Database (but not requiring you to be a DBA) Simple and easy to use push notifications User authentication and data authorization Server side logic so you can craft how your application will function on the server. Scaling – so you can meet the demand of your mobile apps when they get featured Logging and Diagnostics so you can get insight into how your Mobile Service is working Backend processing using something called Scheduler Notes: You may want to mention at this time that support exists for other platforms as well (Win Store, Win Phone, Android, iOS, HTML/JS, Xamarin, etc)
  • #20: RDFE (RedDog Front End) is the publicly exposed API which is the front end to the Management Portal and the Service Management API (ie. Visual Studio, Azure MMC, etc). All requests from the user go through RDFE. FFE (Fabric Front End) is the layer which translates requests from RDFE into the fabric commands. All requests from RDFE go through the FFE to reach the fabric controllers. ARR: Application Request Routing
  • #22: Slide Objectives: Start talking about server side scripts Transition: Speaking Points: In addition to creating a REST API when you generate a table, Mobile Services also creates scripts which intercept CRUD requests against your table As Mobile Services is built off of Node.js, these scripts are Node style scripts By default these scripts just pass through whatever you have sent over to SQL DB However, you can customize your own logic in these scripts to do whatever you want Notes:
  • #23: Slide Objectives: Mention some of the modules available out of the box in the server side scripts Transition: There is a ton of stuff you can do in the scripts and we’ve exposed several modules already to make doing things easy Speaking Points: Some of the modules available out of the box are Request – for performing http requests to third party services Push.* - for doing push notifications with APNS, GCM, WNS, MPNS Console – for logging information MSSQL – for performing custom SQL queries and calling stored procedures statusCodes – for returning a status code other than what is expected Azure – for getting access to Windows Azure Table and Blob storage, queues, service bus, etc We also have several partners in the Windows Azure store who offer you other abilities Sendgrid – allows sending emails Pusher – facilitates web socket style real time communication down to mobile apps and websites Twilio – sends SMS messages and offers some other voice capabilities In addition to the modules available out of the box. If you enable source control on your mobile service you can then use the node package manager npm install to install any available node package (e.g twitter, imageprocesing, anything) into your mobile service. Notes:
  • #25: Demo Branch – Step 1
  • #35: Demo Branch – Step 2
  • #37: Slide Objectives: Detail Auth options Speaking Points: Windows Azure Mobile Services enables you to set the following permissions on table operations: Everyone: This means that any 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: Only the correct application key is required to perform the operation. The application key is distributed with the application. Because this key is not securely distributed, it cannot be considered a security token. To secure access to you mobile service data, you must implement authentication. Only Authenticated Users: Only authenticated users are permitted to perform the operation. In this preview release, clients are authenticated by Live Connect services. 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. The user parameter is available in all server side scripts methods and can be used to add more granular auth polices on you CRUD operations Notes:
  • #38: Slide Objectives: Review the flow of authenticating users Transition: There is a fourth mode of authorization which is “Only authenticated users” Speaking Points: You’ve got a couple options when it comes to authenticating your users. First, Mobile Services has built in support for handling authentication with several popular providers. To use this method, you call a login method from the Mobile Services SDK This opens a webview which goes to a URL in your Mobile Service which in turn directs you to whichever provider you selected Facebook Google Microsoft Twitter When the user finishes logging in, they are handed back to your Mobile Service The Mobile Service then returns to your app with a User ID and an Auth Token The Auth token is important because it’s basically your User ID with some other information that has been signed by the Master Key of your service. The alternative flow is to use a native SDK to authenticate your user. This gives you back a provider token This token can be sent to your Service through another background method which will return a User ID and Auth Token Once you’ve got a User ID and token, you can then hit your API and the security layer will check to make sure that User ID and token are valid and unexpired Notes:
  • #39: Slide Objectives: Review different authorization options for permissions on tables and custom APIs Transition: Let’s move into authentication and authorization Speaking Points: When you generate a table, you’re generating a REST API which then passes the request through to your scripts However, there is also a security layer there This security layer makes sure that you have the appropriate permission to make it through to the script layer This permission is something you can set for each individual operation against a table (so insert can be different from delete, etc) The first mode is “Everyone” this means you don’t need any additional checks to perform the operation, if the API endpoint is known, it can be called. The second is App Key, this is where you send over an app key as a header with each request. If you have it and it’s correct, you make it htrough. Note that this should only be used during the development stage because once your app is available, people can get access to the key The third option is Admin / Scripts. This is similar to app key in that you pass the master key over as a header. If you’re sending the master key over, you by pass both the App Key and the Authenticated user restriction we’ll talk about next Notes:
  • #40: Slide Objectives: Review different authorization options for permissions on tables and custom APIs Transition: Let’s move into authentication and authorization Speaking Points: When you generate a table, you’re generating a REST API which then passes the request through to your scripts However, there is also a security layer there This security layer makes sure that you have the appropriate permission to make it through to the script layer This permission is something you can set for each individual operation against a table (so insert can be different from delete, etc) The first mode is “Everyone” this means you don’t need any additional checks to perform the operation, if the API endpoint is known, it can be called. The second is App Key, this is where you send over an app key as a header with each request. If you have it and it’s correct, you make it htrough. Note that this should only be used during the development stage because once your app is available, people can get access to the key The third option is Admin / Scripts. This is similar to app key in that you pass the master key over as a header. If you’re sending the master key over, you by pass both the App Key and the Authenticated user restriction we’ll talk about next Notes:
  • #48: Slide Objectives: Review different authorization options for permissions on tables and custom APIs Transition: Let’s move into authentication and authorization Speaking Points: When you generate a table, you’re generating a REST API which then passes the request through to your scripts However, there is also a security layer there This security layer makes sure that you have the appropriate permission to make it through to the script layer This permission is something you can set for each individual operation against a table (so insert can be different from delete, etc) The first mode is “Everyone” this means you don’t need any additional checks to perform the operation, if the API endpoint is known, it can be called. The second is App Key, this is where you send over an app key as a header with each request. If you have it and it’s correct, you make it htrough. Note that this should only be used during the development stage because once your app is available, people can get access to the key The third option is Admin / Scripts. This is similar to app key in that you pass the master key over as a header. If you’re sending the master key over, you by pass both the App Key and the Authenticated user restriction we’ll talk about next Notes:
  • #49: Demo3
  • #56: Demo4
  • #63: Demo5
  • #67: Demo6 - SignalR
  • #69: Slide Objectives: Review Script Source Control, Shared Scripts, and NPM support Demo: Script: http://www.windowsazure.com/en-us/develop/mobile/tutorials/store-scripts-in-source-control/ Transition: When Mobile Services was launched, you were limited to editing scripts in the portal and using only the modules we made available Speaking Points: Thankfully now, we’ve opened things up so you can do so much more. Script source control allows you to: Create a Git repo where you can pull and push your table, scheduler, custom API scripts and permissions Enables you to work on your scripts locally and push them to your Mobile Service Shared Scripts enable you to: Put functionality you need in several places into a single script which you then mark as exported You can then require these scripts from your table, scheduler, and custom API scripts Just like creating an NPM module NPM support allows you to install from the vast array of NPM modules publicly available and then use from your other scripts Notes:
  • #71: Manual clone