SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Laat ons weten wat u vindt van deze sessie! Vul de evaluatie
in via www.techdaysapp.nl en maak kans op een van de 20
prijzen*. Prijswinnaars worden bekend gemaakt via Twitter
(#TechDaysNL). Gebruik hiervoor de code op uw badge.
Let us know how you feel about this session! Give your
feedback via www.techdaysapp.nl and possibly win one of
the 20 prizes*. Winners will be announced via Twitter
(#TechDaysNL). Use your personal code on your badge.
* Over de uitslag kan niet worden gecorrespondeerd, prijzen zijn voorbeelden – All results are final, prizes are
examples
Building Mobile Apps
with a Mobile Services
.NET Backend
Sasha Goldshtein
CTO, Sela Group
Microsoft C# MVP, Azure MRS, Azure Insider
blog.sashag.net
@goldshtn
Who are we?
App developers
What do we hate?
Backends
Azure Mobile Services is a backend
for your mobile apps
… that has a free tier
… and cloud scale
… and support for all mobile
platforms
This talk will focus on the .NET
backend and the C# clients
… the Node.js backend with
iOS/Android clients was discussed
earlier today
Platforms and Features
Platforms (client libraries)
• Windows Phone
• Windows 8
• Xamarin
• iOS
• Android
• HTML/JavaScript
• PhoneGap
Features
• Data and queries
• Push notifications
• Authentication
• Data access customization
• Custom API
• Offline sync
• Mass push
• Remote debugging
• Local deployment for testing
System Diagram
Microsoft Azure
SQL
Database
ASP.NET
Web API
backend
Microsoft
Push
Notification
Service
Facebook
Auth Provider
Windows
Notification
Service
Microsoft Auth
Provider
Data Query
var service = new MobileServiceClient(
“http://rentahome.azure-mobile.net/”,
“<APPLICATION KEY>”
);
var table = service.GetTable<Apartment>();
List<Apartment> apartments =
await table.Where(a => a.Rented == false)
.ToListAsync();
Authentication
var user = await service.LoginAsync(
MobileAuthenticationProvider.Facebook);
Client-Side Push Registration
var channel = await PushNotificationChannelManager.
CreatePushNotificationChannelForApplicationAsync();
await service.GetPush()
.RegisterNativeAsync(channel.Uri);
Visual Studio Support
Server-Side Push
public async Task<IHTTPActionResult> PostApartment(
Apartment apartment)
{
var inserted = await InsertAsync(apartment);
var push = new ApplePushMessage(
“Added apartment at ” + apartment.Address, null);
await Services.Push.SendAsync(push);
return CreatedAtRoute(“Tables”,
new { id = inserted.Id }, inserted);
}
Server-Side Authorization
[RequiresAuthorization(AuthorizationLevel.User)]
public async Task<IHTTPActionResult> PostApartment(
Apartment apartment)
{
var inserted = await InsertAsync(apartment);
return CreatedAtRoute(“Tables”,
new { id = inserted.Id }, inserted);
}
Demo
Building the “Rent a Home”
Windows Store App
with the Mobile Services .NET Backend
Offline Sync Support
Currently in Preview, only for Windows Store apps
Uses SQLite backing store
Manual push and pull, no auto-sync
Conflict detection and management
Preparing Data Model for Offline
Sync Support
public class Apartment
{
public string Id { get; set; }
public bool Rented { get; set; }
public string Address { get; set; }
public uint Bedrooms { get; set; }
[Version]
public string Version { get; set; }
}
Initializing Sync Table and Store
var table = service.GetSyncTable<Apartment>();
if (!service.SyncContext.IsInitialized)
{
var store = new MobileServiceSQLiteStore(“my.db”);
store.DefineTable<Apartment>()
await service.SyncContext.InitializeAsync(store,
new MobileServiceSyncHandler());
}
Pull and Push
// May throw if there is a connection problem
await table.PullAsync();
var list = await table.OrderBy(a => a.Bedrooms)
.ToListAsync();
table.Insert(new Apartment(...));
// May throw if there is a connection problem
// or a conflict, cf. MobileServicePushFailedException
service.SyncContext.PushAsync();
Demo
Adding Offline Sync Support
Questions?
Sasha Goldshtein
blog.sashag.net
@goldshtn
Laat ons weten wat u vindt van deze sessie! Vul de evaluatie
in via www.techdaysapp.nl en maak kans op een van de 20
prijzen*. Prijswinnaars worden bekend gemaakt via Twitter
(#TechDaysNL). Gebruik hiervoor de code op uw badge.
Let us know how you feel about this session! Give your
feedback via www.techdaysapp.nl and possibly win one of
the 20 prizes*. Winners will be announced via Twitter
(#TechDaysNL). Use your personal code on your badge.
* Over de uitslag kan niet worden gecorrespondeerd, prijzen zijn voorbeelden – All results are final, prizes are
examples
Building Mobile Apps with a Mobile Services .NET Backend

Weitere ähnliche Inhalte

Ähnlich wie Building Mobile Apps with a Mobile Services .NET Backend

VSTS and VS AppCenter overview and mobile releases 2018-05-30
VSTS and VS AppCenter overview and mobile releases 2018-05-30VSTS and VS AppCenter overview and mobile releases 2018-05-30
VSTS and VS AppCenter overview and mobile releases 2018-05-30Okko Oulasvirta
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobileFlavius-Radu Demian
 
Reusing JavaScript knowledge in Windows Store apps
Reusing JavaScript knowledge in Windows Store appsReusing JavaScript knowledge in Windows Store apps
Reusing JavaScript knowledge in Windows Store appsTimmy Kokke
 
AI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedAI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedMarvin Heng
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB
 
The fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose ReactThe fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose ReactOliver N
 
Integrating WordPress With Web APIs
Integrating WordPress With Web APIsIntegrating WordPress With Web APIs
Integrating WordPress With Web APIsrandyhoyt
 
2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile ServicesMarco Parenzan
 
Building Push Triggers for Logic Apps
Building Push Triggers for Logic AppsBuilding Push Triggers for Logic Apps
Building Push Triggers for Logic AppsBizTalk360
 
Metaverse and Digital Twins on Enterprise-Public.pdf
Metaverse and Digital Twins on Enterprise-Public.pdfMetaverse and Digital Twins on Enterprise-Public.pdf
Metaverse and Digital Twins on Enterprise-Public.pdf湯米吳 Tommy Wu
 
Building Your First App with MongoDB Stitch
Building Your First App with MongoDB StitchBuilding Your First App with MongoDB Stitch
Building Your First App with MongoDB StitchMongoDB
 
Google Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScriptGoogle Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScriptwesley chun
 
Telerik Kendo UI Overview
Telerik Kendo UI OverviewTelerik Kendo UI Overview
Telerik Kendo UI OverviewEd Musters
 
Introduction to Titanium and how to connect with a PHP backend
Introduction to Titanium and how to connect with a PHP backendIntroduction to Titanium and how to connect with a PHP backend
Introduction to Titanium and how to connect with a PHP backendJoseluis Laso
 
2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to Apps2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to AppsGilles Pommier
 
Windows Azure Mobile Services
Windows Azure Mobile ServicesWindows Azure Mobile Services
Windows Azure Mobile ServicesSasha Goldshtein
 
Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Matt Raible
 
IoTSummit - Introduction to IoT Hub
IoTSummit - Introduction to IoT HubIoTSummit - Introduction to IoT Hub
IoTSummit - Introduction to IoT HubMarco Silva
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Jonas Follesø
 

Ähnlich wie Building Mobile Apps with a Mobile Services .NET Backend (20)

Coding Naked 2023
Coding Naked 2023Coding Naked 2023
Coding Naked 2023
 
VSTS and VS AppCenter overview and mobile releases 2018-05-30
VSTS and VS AppCenter overview and mobile releases 2018-05-30VSTS and VS AppCenter overview and mobile releases 2018-05-30
VSTS and VS AppCenter overview and mobile releases 2018-05-30
 
Building a chat app with windows azure mobile
Building a chat app with windows azure mobileBuilding a chat app with windows azure mobile
Building a chat app with windows azure mobile
 
Reusing JavaScript knowledge in Windows Store apps
Reusing JavaScript knowledge in Windows Store appsReusing JavaScript knowledge in Windows Store apps
Reusing JavaScript knowledge in Windows Store apps
 
AI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedAI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You Typed
 
MongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDBMongoDB.local Atlanta: Introduction to Serverless MongoDB
MongoDB.local Atlanta: Introduction to Serverless MongoDB
 
The fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose ReactThe fundamental problems of GUI applications and why people choose React
The fundamental problems of GUI applications and why people choose React
 
Integrating WordPress With Web APIs
Integrating WordPress With Web APIsIntegrating WordPress With Web APIs
Integrating WordPress With Web APIs
 
2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services
 
Building Push Triggers for Logic Apps
Building Push Triggers for Logic AppsBuilding Push Triggers for Logic Apps
Building Push Triggers for Logic Apps
 
Metaverse and Digital Twins on Enterprise-Public.pdf
Metaverse and Digital Twins on Enterprise-Public.pdfMetaverse and Digital Twins on Enterprise-Public.pdf
Metaverse and Digital Twins on Enterprise-Public.pdf
 
Building Your First App with MongoDB Stitch
Building Your First App with MongoDB StitchBuilding Your First App with MongoDB Stitch
Building Your First App with MongoDB Stitch
 
Google Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScriptGoogle Apps Script: Accessing G Suite & other Google services with JavaScript
Google Apps Script: Accessing G Suite & other Google services with JavaScript
 
Telerik Kendo UI Overview
Telerik Kendo UI OverviewTelerik Kendo UI Overview
Telerik Kendo UI Overview
 
Introduction to Titanium and how to connect with a PHP backend
Introduction to Titanium and how to connect with a PHP backendIntroduction to Titanium and how to connect with a PHP backend
Introduction to Titanium and how to connect with a PHP backend
 
2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to Apps2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to Apps
 
Windows Azure Mobile Services
Windows Azure Mobile ServicesWindows Azure Mobile Services
Windows Azure Mobile Services
 
Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019
 
IoTSummit - Introduction to IoT Hub
IoTSummit - Introduction to IoT HubIoTSummit - Introduction to IoT Hub
IoTSummit - Introduction to IoT Hub
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 

Mehr von Sasha Goldshtein

Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing LandscapeSasha Goldshtein
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerSasha Goldshtein
 
Staring into the eBPF Abyss
Staring into the eBPF AbyssStaring into the eBPF Abyss
Staring into the eBPF AbyssSasha Goldshtein
 
Visual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET FrameworkVisual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET FrameworkSasha Goldshtein
 
Swift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS XSwift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS XSasha Goldshtein
 
C# Everywhere: Cross-Platform Mobile Apps with Xamarin
C# Everywhere: Cross-Platform Mobile Apps with XamarinC# Everywhere: Cross-Platform Mobile Apps with Xamarin
C# Everywhere: Cross-Platform Mobile Apps with XamarinSasha Goldshtein
 
Modern Backends for Mobile Apps
Modern Backends for Mobile AppsModern Backends for Mobile Apps
Modern Backends for Mobile AppsSasha Goldshtein
 
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013Sasha Goldshtein
 
Mastering IntelliTrace in Development and Production
Mastering IntelliTrace in Development and ProductionMastering IntelliTrace in Development and Production
Mastering IntelliTrace in Development and ProductionSasha Goldshtein
 
Attacking Web Applications
Attacking Web ApplicationsAttacking Web Applications
Attacking Web ApplicationsSasha Goldshtein
 
First Steps in Android Development
First Steps in Android DevelopmentFirst Steps in Android Development
First Steps in Android DevelopmentSasha Goldshtein
 
First Steps in iOS Development
First Steps in iOS DevelopmentFirst Steps in iOS Development
First Steps in iOS DevelopmentSasha Goldshtein
 
JavaScript, Meet Cloud: Node.js on Windows Azure
JavaScript, Meet Cloud: Node.js on Windows AzureJavaScript, Meet Cloud: Node.js on Windows Azure
JavaScript, Meet Cloud: Node.js on Windows AzureSasha Goldshtein
 
First Steps in Android Development with Eclipse and Xamarin
First Steps in Android Development with Eclipse and XamarinFirst Steps in Android Development with Eclipse and Xamarin
First Steps in Android Development with Eclipse and XamarinSasha Goldshtein
 
Visual Studio 2013: Exploration, Productivity, Diagnostics, Collaboration
Visual Studio 2013: Exploration, Productivity, Diagnostics, CollaborationVisual Studio 2013: Exploration, Productivity, Diagnostics, Collaboration
Visual Studio 2013: Exploration, Productivity, Diagnostics, CollaborationSasha Goldshtein
 

Mehr von Sasha Goldshtein (20)

Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing Landscape
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
 
Staring into the eBPF Abyss
Staring into the eBPF AbyssStaring into the eBPF Abyss
Staring into the eBPF Abyss
 
Visual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET FrameworkVisual Studio 2015 and the Next .NET Framework
Visual Studio 2015 and the Next .NET Framework
 
Swift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS XSwift: Apple's New Programming Language for iOS and OS X
Swift: Apple's New Programming Language for iOS and OS X
 
C# Everywhere: Cross-Platform Mobile Apps with Xamarin
C# Everywhere: Cross-Platform Mobile Apps with XamarinC# Everywhere: Cross-Platform Mobile Apps with Xamarin
C# Everywhere: Cross-Platform Mobile Apps with Xamarin
 
Modern Backends for Mobile Apps
Modern Backends for Mobile AppsModern Backends for Mobile Apps
Modern Backends for Mobile Apps
 
.NET Debugging Workshop
.NET Debugging Workshop.NET Debugging Workshop
.NET Debugging Workshop
 
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
Performance and Debugging with the Diagnostics Hub in Visual Studio 2013
 
Mastering IntelliTrace in Development and Production
Mastering IntelliTrace in Development and ProductionMastering IntelliTrace in Development and Production
Mastering IntelliTrace in Development and Production
 
Introduction to RavenDB
Introduction to RavenDBIntroduction to RavenDB
Introduction to RavenDB
 
State of the Platforms
State of the PlatformsState of the Platforms
State of the Platforms
 
Task and Data Parallelism
Task and Data ParallelismTask and Data Parallelism
Task and Data Parallelism
 
What's New in C++ 11?
What's New in C++ 11?What's New in C++ 11?
What's New in C++ 11?
 
Attacking Web Applications
Attacking Web ApplicationsAttacking Web Applications
Attacking Web Applications
 
First Steps in Android Development
First Steps in Android DevelopmentFirst Steps in Android Development
First Steps in Android Development
 
First Steps in iOS Development
First Steps in iOS DevelopmentFirst Steps in iOS Development
First Steps in iOS Development
 
JavaScript, Meet Cloud: Node.js on Windows Azure
JavaScript, Meet Cloud: Node.js on Windows AzureJavaScript, Meet Cloud: Node.js on Windows Azure
JavaScript, Meet Cloud: Node.js on Windows Azure
 
First Steps in Android Development with Eclipse and Xamarin
First Steps in Android Development with Eclipse and XamarinFirst Steps in Android Development with Eclipse and Xamarin
First Steps in Android Development with Eclipse and Xamarin
 
Visual Studio 2013: Exploration, Productivity, Diagnostics, Collaboration
Visual Studio 2013: Exploration, Productivity, Diagnostics, CollaborationVisual Studio 2013: Exploration, Productivity, Diagnostics, Collaboration
Visual Studio 2013: Exploration, Productivity, Diagnostics, Collaboration
 

Kürzlich hochgeladen

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Kürzlich hochgeladen (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

Building Mobile Apps with a Mobile Services .NET Backend

  • 1.
  • 2. Laat ons weten wat u vindt van deze sessie! Vul de evaluatie in via www.techdaysapp.nl en maak kans op een van de 20 prijzen*. Prijswinnaars worden bekend gemaakt via Twitter (#TechDaysNL). Gebruik hiervoor de code op uw badge. Let us know how you feel about this session! Give your feedback via www.techdaysapp.nl and possibly win one of the 20 prizes*. Winners will be announced via Twitter (#TechDaysNL). Use your personal code on your badge. * Over de uitslag kan niet worden gecorrespondeerd, prijzen zijn voorbeelden – All results are final, prizes are examples
  • 3. Building Mobile Apps with a Mobile Services .NET Backend Sasha Goldshtein CTO, Sela Group Microsoft C# MVP, Azure MRS, Azure Insider blog.sashag.net @goldshtn
  • 4. Who are we? App developers What do we hate? Backends
  • 5. Azure Mobile Services is a backend for your mobile apps … that has a free tier … and cloud scale … and support for all mobile platforms
  • 6. This talk will focus on the .NET backend and the C# clients … the Node.js backend with iOS/Android clients was discussed earlier today
  • 7. Platforms and Features Platforms (client libraries) • Windows Phone • Windows 8 • Xamarin • iOS • Android • HTML/JavaScript • PhoneGap Features • Data and queries • Push notifications • Authentication • Data access customization • Custom API • Offline sync • Mass push • Remote debugging • Local deployment for testing
  • 8. System Diagram Microsoft Azure SQL Database ASP.NET Web API backend Microsoft Push Notification Service Facebook Auth Provider Windows Notification Service Microsoft Auth Provider
  • 9. Data Query var service = new MobileServiceClient( “http://rentahome.azure-mobile.net/”, “<APPLICATION KEY>” ); var table = service.GetTable<Apartment>(); List<Apartment> apartments = await table.Where(a => a.Rented == false) .ToListAsync();
  • 10. Authentication var user = await service.LoginAsync( MobileAuthenticationProvider.Facebook);
  • 11. Client-Side Push Registration var channel = await PushNotificationChannelManager. CreatePushNotificationChannelForApplicationAsync(); await service.GetPush() .RegisterNativeAsync(channel.Uri);
  • 13. Server-Side Push public async Task<IHTTPActionResult> PostApartment( Apartment apartment) { var inserted = await InsertAsync(apartment); var push = new ApplePushMessage( “Added apartment at ” + apartment.Address, null); await Services.Push.SendAsync(push); return CreatedAtRoute(“Tables”, new { id = inserted.Id }, inserted); }
  • 14. Server-Side Authorization [RequiresAuthorization(AuthorizationLevel.User)] public async Task<IHTTPActionResult> PostApartment( Apartment apartment) { var inserted = await InsertAsync(apartment); return CreatedAtRoute(“Tables”, new { id = inserted.Id }, inserted); }
  • 15. Demo Building the “Rent a Home” Windows Store App with the Mobile Services .NET Backend
  • 16. Offline Sync Support Currently in Preview, only for Windows Store apps Uses SQLite backing store Manual push and pull, no auto-sync Conflict detection and management
  • 17. Preparing Data Model for Offline Sync Support public class Apartment { public string Id { get; set; } public bool Rented { get; set; } public string Address { get; set; } public uint Bedrooms { get; set; } [Version] public string Version { get; set; } }
  • 18. Initializing Sync Table and Store var table = service.GetSyncTable<Apartment>(); if (!service.SyncContext.IsInitialized) { var store = new MobileServiceSQLiteStore(“my.db”); store.DefineTable<Apartment>() await service.SyncContext.InitializeAsync(store, new MobileServiceSyncHandler()); }
  • 19. Pull and Push // May throw if there is a connection problem await table.PullAsync(); var list = await table.OrderBy(a => a.Bedrooms) .ToListAsync(); table.Insert(new Apartment(...)); // May throw if there is a connection problem // or a conflict, cf. MobileServicePushFailedException service.SyncContext.PushAsync();
  • 22. Laat ons weten wat u vindt van deze sessie! Vul de evaluatie in via www.techdaysapp.nl en maak kans op een van de 20 prijzen*. Prijswinnaars worden bekend gemaakt via Twitter (#TechDaysNL). Gebruik hiervoor de code op uw badge. Let us know how you feel about this session! Give your feedback via www.techdaysapp.nl and possibly win one of the 20 prizes*. Winners will be announced via Twitter (#TechDaysNL). Use your personal code on your badge. * Over de uitslag kan niet worden gecorrespondeerd, prijzen zijn voorbeelden – All results are final, prizes are examples