27
Amal Dev Forms + Azure Dev Days

Forms + azure

Embed Size (px)

Citation preview

Page 1: Forms + azure

Amal Dev

Forms + Azure

Dev Days

Page 2: Forms + azure

About Me !!!

Microsoft MVP

10+ years of professional experience

Blogger

Speaker

Full Stack Web Developer in Microsoft Technologies

Technical Analyst with UST Global

Page 3: Forms + azure

We

Apps!

189Mdownloadsa day

200mins onphone

127mins

inapps

Page 4: Forms + azure

The average app user has 36 apps installed on his or her phone.

Page 5: Forms + azure

Only 1/4 are used daily:

Page 6: Forms + azure

1/4 of apps are never used!

Page 7: Forms + azure

Bad App Experiences

Page 8: Forms + azure

Always Connected ?

Page 10: Forms + azure
Page 11: Forms + azure
Page 12: Forms + azure

Offline Storage to your rescue !!!

Page 13: Forms + azure

What about a backend ?

Page 14: Forms + azure

Plen

ty o

f Opt

ions

Page 15: Forms + azure

Infrastructuredesigned for Scale100+ datacenters

Top 3 networks in the world2x AWS, 6x Google DC Regions

G Series – Largest VM in World32 cores, 448GB RAM, SSD….

Operational

Announced

* Operated by 21Vianet

Azure computeregions open today

More than AWS andGoogle Cloud combined

Datacenters recentlyadded in Canadaand India

Page 16: Forms + azure

Why Azure ?

• Extremely Powerful• Flexible• Easy Tables• App Service

• C# SDKs available everywhere.• C#-iOS, Android & Windows with Xamarin• C# clients, written by C# developers(open source)• C# backend with ASP.NET

Page 17: Forms + azure

Shared C# codebase• 100% native API access • High performance

iOS C# UI Android C# UI Windows C# UI Azure Linux/Mono CoreCLR

Shared C# Mobile C# Server

Shared C# Client/Server

Xamarin Apps + Backend Services

Page 18: Forms + azure

REST

AP

I

Azur

e Mo

bile

App

s

Facebook

Twitter

Microsoft

Google

Azure Active Directory

Windows

Android Chrome

iOS OSX

In-App

Kindle

Backend code

SQL

Tables

O365

Offline Sync

Offline sync

Page 19: Forms + azure

Mobile Offline Sync

Page 20: Forms + azure

How offline sync works

Page 21: Forms + azure

Let’s add a backend

Page 22: Forms + azure

Create a Mobile Service

MobileService = new MobileServiceClient(

"https://myapp.azurewebsites.net");

Page 23: Forms + azure

Create Tables

IMobileServiceSyncTable<TodoItem> syncTable;

public async Task Init(){

const string path = "syncstore.db";var db = new MobileServiceSQLiteStore(path); db.DefineTable<TodoItem>();

await MobileService.SyncContext.InitializeAsync(db);syncTable =MobileService.GetSyncTable<TodoItem>();

}

Page 24: Forms + azure

Push and pull with sync table

private async Task SyncAsync(){

await MobileService.SyncContext.PushAsync();var query = syncTable.CreateQuery();

await syncTable.PullAsync("todoItems", query);}

private async Task InsertTodoItem(TodoItem todoItem){

await syncTable.InsertAsync(todoItem);await MobileService.SyncContext.PushAsync();

}

Page 25: Forms + azure

Query local table

public async Task<IEnumerable<TodoItem>> GetOpenItemsAsync(){

return await todoTable.Where(item => item.Complete == false).ToEnumerableAsync();

}

Page 26: Forms + azure

DEMO

Page 27: Forms + azure

Thank You

Read my blogs at www.techrepository.inRead my tweets @amaldevv