connected & disconnected apps with xamarin

Post on 23-Jan-2018

223 Views

Category:

Mobile

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

#XamarinDevDays

We Apps!

189Mdownloads

a day

200mins on

phone

127mins in

apps

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

Only 1/4 are used daily:

1/4 of apps are never used!

http://opensignal.com/coverage-maps

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

iOS C# UI Windows C# UIAndroid C# UI

Shared C# Mobile C# Server

Linux/Mono

CoreCLRAzure

Shared C# Client/Server

REST A

PI

Offline sync

Facebook Twitter Microsoft Google Azure Active Directory

Azure Mobile Apps

WindowsAndroidChrome

iOS OSX

In-AppKindle

Backend code

SQL MongoTables O365 API Apps

Offline Sync

Create a Mobile Service

MobileService = new MobileServiceClient(

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

Create TablesIMobileServiceSyncTable<Store> table;

public async Task Init()

{

const string path = "syncstore.db";

var db = new MobileServiceSQLiteStore(path);

db.DefineTable<Store>();

}

var handler = new MobileServiceSyncHandler();

await MobileService.SyncContext.InitializeAsync(db, h);

table = MobileService.GetSyncTable<Store>();

Get and Modify Datapublic async Task<IEnumerable<Store>> GetStoresAsync()

{

await table.PullAsync("allStores", table.CreateQuery());

return await table.ToEnumerableAsync();

}

public async Task<Store> AddStoreAsync (Store store){

await table.InsertAsync (store);await table.PullAsync("allStores", table.CreateQuery());await MobileService.SyncContext.PushAsync();return store;

}

Let’s add a backend

So Much More

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

iOS C# UI Windows C# UIAndroid C# UI

Shared C# Mobile C# Server

Linux/Mono

CoreCLRAzure

Shared C# Client/Server

Lunch!

Rui

Marinho

Software Engineer - Xamarin Forms

rumar@microsoft.com github.com/rmarinho @ruiespinho

top related