Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Connected & Disconnected Apps with Azure Mobile Apps


Published on

Learn how to make fully functional connected apps without internet connection using Xamarin and Azure Mobile Apps Service. Slides from my talk at Xamarin Dev Days held at CET Trivandrum

Published in: Software
  • Be the first to comment

  • Be the first to like this

Connected & Disconnected Apps with Azure Mobile Apps

  1. 1. We Apps! 189M downloads a day 200 mins on phone 127 mins in apps
  2. 2. The average app user has 36 apps installed on his or her phone.
  3. 3. Only 1/4 are used daily:
  4. 4. 1/4 of apps are never used!
  5. 5.
  6. 6. PlentyofOptions
  7. 7. Infrastructure designed for Scale
  8. 8. RESTAPI Offline sync Facebook Twitter Microsoft Google Azure Active Directory Azure Mobile Apps WindowsAndroid Chrome iOS OSX In-AppKindle Backend code SQL MongoTables O365 API Apps Offline Sync
  9. 9. Mobile Offline Sync
  10. 10. How offline sync works
  11. 11. Create a Mobile Service MobileService = new MobileServiceClient( "");
  12. 12. 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>();
  13. 13. 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(); }
  14. 14. Query local table public async Task<IEnumerable<TodoItem>> GetOpenItemsAsync() { return await todoTable .Where(item => item.Complete == false) .ToEnumerableAsync(); }
  15. 15. 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
  16. 16. Get started today