azure mobile services .net backend

18
Azure Mobile Services .NET Backend Shiju Varghese https:// github.com/shijuvar

Upload: shiju-varghese

Post on 17-May-2015

286 views

Category:

Technology


3 download

DESCRIPTION

Technical session on at Kerela Microsoft Users Group (K-MUG), on 26th July, 2014

TRANSCRIPT

Page 1: Azure Mobile Services .NET Backend

Azure Mobile Services .NET Backend

Shiju Varghesehttps://github.com/shijuvar

Page 2: Azure Mobile Services .NET Backend

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

Agenda

• Azure Mobile Services• Azure Mobile Services .NET Backend• Demos

Page 4: Azure Mobile Services .NET Backend

Azure Mobile Services

Page 5: Azure Mobile Services .NET Backend

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

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

Azure Mobile Services

Data

Notifications

Auth

Server Logic

Scheduler

Logging & Diag

Scale

Page 8: Azure Mobile Services .NET Backend

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

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
Page 11: Azure Mobile Services .NET Backend
Page 12: Azure Mobile Services .NET Backend

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

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

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

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

Nothing but demos

Page 17: Azure Mobile Services .NET Backend

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

Be well,write good code,

and stay in touch@shijucv

https://github.com/shijuvar