Azure Mobile Services .NET Backend
-
Upload
shiju-varghese -
Category
Technology
-
view
287 -
download
3
description
Transcript of Azure Mobile Services .NET Backend
![Page 1: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/1.jpg)
Azure Mobile Services .NET Backend
Shiju Varghesehttps://github.com/shijuvar
![Page 2: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/2.jpg)
About Me
• Microsoft Azure MVP• Microsoft Azure Insider• Member of Advisory Board, Azure Mobile
Services• Cloud Solutions Architect• Twitter - @shijucv • http://weblogs.asp.net/shijuvarghese
![Page 3: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/3.jpg)
Agenda
• Azure Mobile Services• Azure Mobile Services .NET Backend• Demos
![Page 4: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/4.jpg)
Azure Mobile Services
![Page 5: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/5.jpg)
Azure Mobile Services provides a turnkey way for mobile developers to add a cloud-hosted backend to their app. Backend logic can be written in either Node.js or ASP.NET Web API.
![Page 6: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/6.jpg)
Azure Mobile Services .NET Backend
Azure Mobile Services .NET Backend, lets the .NET developers add a backend to their mobile apps, using ASP.NET Web API and the Visual Studio tooling experience.
![Page 7: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/7.jpg)
Azure Mobile Services
Data
Notifications
Auth
Server Logic
Scheduler
Logging & Diag
Scale
![Page 8: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/8.jpg)
Azure Mobile Services• Scalable, Mobile backend as a services on the
Cloud• Native SDKs for Windows Phone and Windows
Store, Android, iOS, Xamarin, HTML5, Sencha, and PhoneGap.
• Push notifications to millions of mobile devices• User authentication with Active Directory,
Facebook, Twitter and Google• Store data in SQL, Table Storage and MongoDB
![Page 9: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/9.jpg)
Azure Mobile Services
• Access on-premises systems, Office 365 and SharePoint
• Use cloud-based sync to build apps that work offline
• Scheduler services for schedule recurring jobs• Auto-scaling, service monitoring and
management
![Page 10: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/10.jpg)
![Page 11: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/11.jpg)
![Page 12: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/12.jpg)
Automatic REST API for the Virtual Tables
Action HTTP Verb URL Suffix
Create POST /TodoItem
Get All GET /TodoItem
Get GET /TodoItem/id
Update PATCH /TodoItem/id
Delete DELETE /TodoItem/id
Data Operations and their REST Equivalents
REST API Endpoint
http://{service}.azure-mobile.net/tables/{table-name}/
![Page 13: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/13.jpg)
Create Mobile Services Client in Windows Store App
using Microsoft.WindowsAzure.MobileServices;
MobileServiceClient MobileService = new MobileServiceClient("https://{mobile_service_name}.azure-mobile.net/", “{application_key}“);
![Page 14: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/14.jpg)
Working with MongoDB As A Data Store Step 1 - Install the WindowsAzure.MobileServices.Backend.Mongo NuGet package.Step 2 – Create data models derived from DocumentData instead of EntityData.public class Order : DocumentData{ public DateTime OrderDate { get; set; } public string Client { get; set; } }
![Page 15: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/15.jpg)
Using MongoDB As A Data Store
Step 3 - Initialize method with the following:protected override async void Initialize(HttpControllerContext controllerContext){ base.Initialize(controllerContext); string connectionStringName = "MongoConnectionString"; string databaseName = "<YOUR-DATABASE-NAME>"; string collectionName = "todoItems"; InitializeConnectionString(connectionStringName); DomainManager = new MongoDomainManager<TodoItem>(connectionStringName, databaseName, collectionName, Request, Services);}
![Page 16: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/16.jpg)
Nothing but demos
![Page 17: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/17.jpg)
Get a Windows Azure Free Trial Account
http://azure.microsoft.com/
Windows Azure Mobile Services
http://azure.microsoft.com/mobile
Resources
![Page 18: Azure Mobile Services .NET Backend](https://reader038.fdocuments.net/reader038/viewer/2022103016/5557d583d8b42af2178b4d74/html5/thumbnails/18.jpg)
Be well,write good code,
and stay in touch@shijucv
https://github.com/shijuvar