connected & disconnected apps with xamarin

of 26 /26
#XamarinDevDays

Upload: rui-marinho

Post on 23-Jan-2018

221 views

Category:

Mobile


3 download

TRANSCRIPT

Page 1: Connected & Disconnected Apps with Xamarin

#XamarinDevDays

Page 2: Connected & Disconnected Apps with Xamarin
Page 3: Connected & Disconnected Apps with Xamarin

We Apps!

189Mdownloads

a day

200mins on

phone

127mins in

apps

Page 4: Connected & Disconnected Apps with Xamarin

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

Page 5: Connected & Disconnected Apps with Xamarin

Only 1/4 are used daily:

Page 6: Connected & Disconnected Apps with Xamarin

1/4 of apps are never used!

Page 7: Connected & Disconnected Apps with Xamarin
Page 8: Connected & Disconnected Apps with Xamarin
Page 9: Connected & Disconnected Apps with Xamarin

http://opensignal.com/coverage-maps

Page 10: Connected & Disconnected Apps with Xamarin
Page 11: Connected & Disconnected Apps with Xamarin
Page 12: Connected & Disconnected Apps with Xamarin
Page 13: Connected & Disconnected Apps with Xamarin
Page 14: Connected & Disconnected Apps with Xamarin
Page 15: Connected & Disconnected Apps with Xamarin

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

Page 16: Connected & Disconnected Apps with Xamarin

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

Page 17: Connected & Disconnected Apps with Xamarin

Create a Mobile Service

MobileService = new MobileServiceClient(

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

Page 18: Connected & Disconnected Apps with Xamarin

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>();

Page 19: Connected & Disconnected Apps with Xamarin

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;

}

Page 20: Connected & Disconnected Apps with Xamarin

Let’s add a backend

Page 21: Connected & Disconnected Apps with Xamarin

So Much More

Page 22: Connected & Disconnected Apps with Xamarin

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

Page 23: Connected & Disconnected Apps with Xamarin
Page 24: Connected & Disconnected Apps with Xamarin
Page 26: Connected & Disconnected Apps with Xamarin

Lunch!

Rui

Marinho

Software Engineer - Xamarin Forms

[email protected] github.com/rmarinho @ruiespinho