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.

Xamarin Dev Days 2017 - Connected & disconnected apps with Azure Mobile Apps

824 views

Published on

Session #3 at the Xamarin DevDays 2017. I spoke about how to create a backend for your mobile apps using Azure Mobile Apps.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Xamarin Dev Days 2017 - Connected & disconnected apps with Azure Mobile Apps

  1. 1. opensignal.com/coverage-maps
  2. 2. Infrastructure designed for Scale
  3. 3. Content Delivery Network (CDN) Media Services HDInsight Machine Learning Stream Analytics Data Factory Event Hubs Mobile Engagement Biztalk Services Hybrid Connections Service Bus Storage Queues Backup StorSimple Site Recovery Import/Export SQL Database DocumentDB Redis Cache Search Tables SQL Data Warehouse Azure AD Connect Health AD Privileged Identity Mngt Operational Insights Cloud Services Batch Remote App Service Fabric Visual Studio Application Insights Azure SDK Team Project Active Directory Multi-Factor Authentication Automation Portal Key Vault Store / Marketplace VM Image Gallery & VM Depot SECURITY & MANAGEMENT PLATFORM SERVICES HYBRID OPERATIONS Web Apps Mobile Apps API Management API Apps Logic Apps Notification Hubs
  4. 4. Web Apps Logic Apps Mobile Apps API Apps Customer site Administration App Order Completed Customer App
  5. 5. 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
  6. 6. Shared C# codebase • 100% native API access • High performance iOS C# UI Windows C# UIAndroid C# UI Shared C# Mobile C# Server Shared C# Client/Server C#
  7. 7. Shared C# codebase • 100% native API access • High performance iOS C# UI Windows C# UIAndroid C# UI Shared C# Mobile Node.JS Server Shared C# Client/Server JavaScript Easy
  8. 8. Create a Mobile Service MobileService = new MobileServiceClient( "https://myapp.azurewebsites.net");
  9. 9. Create tables (online) IMobileServiceTable<TodoItem> table; public async Task Init() { table = MobileService.GetTable<TodoItem>(); }
  10. 10. Create tables (offline) IMobileServiceSyncTable<TodoItem> syncTable; public async Task Init() { const string path = "syncstore.db"; var db = new MobileServiceSQLiteStore(path); db.DefineTable<TodoItem>(); } var handler = new MobileServicesSyncHandler(); await MobileService.SyncContext.InitializeAsync(db); syncTable = MobileService.GetSyncTable<TodoItem>();
  11. 11. 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(); }
  12. 12. Query local table public async Task<IEnumerable<TodoItem>> GetOpenItemsAsync() { return await todoTable .Where(item => item.Complete == false) .ToEnumerableAsync(); }
  13. 13. Notification Hub • Maps between tags and handles 1. Get PNS handle 4. Send to device 2. Store PNS handle 3b. Request notification Use device handles 3a. Request notification Use logical users/tags 5. Manage device handles
  14. 14. Shopping Demo App Azure Services: • Cognitive Services (Emotion API) • Storage • On/offline sync • Push notifications • Authentication What’s Available: • Complete sample app with documentation • Individual “quick starts” github.com/Microsoft/XamarinAzure_ShoppingDemoApp
  15. 15. Get started today xamarin.com/download xamarin.com/azure xamarin.com/dev-ops
  16. 16. Lunch! Guy Barrette Freelance architect/dev Microsoft Azure MVP guy@guybarrette.com http://guy.cloud @GuyBarrette

×