Slide 1

Slide 1 text

JÖRG NEUMANN | ACANDO ENTERPRISE-APPS MIT XAMARIN UND DEN AZURE APP SERVICES ENTWICKELN

Slide 2

Slide 2 text

JÖRG NEUMANN THEMEN ▪ Mobile Development ▪ UI-Technologien ▪ Consulting, Coaching, Training KONTAKT ▪ Mail: [email protected] ▪ Twitter: @JoergNeumann ▪ GitHub: https://github.com/JoergNeumann ▪ Blog: www.HeadWriteLine.BlogSpot.com

Slide 3

Slide 3 text

Eine App ist keine Insel!

Slide 4

Slide 4 text

CONTINUOUS INTEGRATION SYNCHRONIZATION MOBILE BACKEND DATABASE CROSS-PLATFORM APP STAGING ENVIRONMENT MOBILE BACKEND DATABASE PUSH NOTIFICATIONS OFFLINE-SUPPORT MONITORING SECURITY

Slide 5

Slide 5 text

SYNCHRONIZATION MOBILE BACKEND DATABASE CROSS-PLATFORM APP PUSH NOTIFICATIONS OFFLINE-SUPPORT MONITORING SECURITY Xamarin SQLite Web API OData Entity Framework OAuth Social Login Conflict Resolution

Slide 6

Slide 6 text

AZURE APP SERVICES WEB APPS MOBILE APPS API APPS LOGIC APPS

Slide 7

Slide 7 text

AZURE MOBILE APPS FEATURES ▪ .NET/Node basierte Endpunkte ▪ Data Management ▪ Authentifizierung ▪ Push Notifications ▪ Offline-Funktionalität ▪ CI über GitHub, BitBucket, VSTS

Slide 8

Slide 8 text

AZURE MOBILE APPS Resource Group App Services My Mobile Service SQL Azure ▪ Region („USA, Westen“, „USA, Osten“, …) ▪ Skalierung (Instanzenanzahl) ▪ Instanzgröße (klein, mittel, groß) ▪ SKU (Free, Shared, Basic, Standard, Premium) App Service Plan

Slide 9

Slide 9 text

DEMO AZURE MOBILE APPS EINRICHTEN

Slide 10

Slide 10 text

SYNCHRONIZATION MOBILE BACKEND DATABASE CROSS-PLATFORM APP PUSH NOTIFICATIONS OFFLINE-SUPPORT MONITORING SECURITY public class Person { [JsonProperty(PropertyName = "id")] public string Id { get; set; } [JsonProperty(PropertyName = "name")] public string Name { get; set; } } Client Model public class Person : EntityData { public string Name { get; set; } } Service Model public class EntityData { public string Id { get; set; } public byte[] Version { get; set; } public DateTime CreatedAt { get; set; } public DateTime UpdatedAt { get; set; } public bool Deleted { get; set; } } EntityData

Slide 11

Slide 11 text

DATA MANAGEMENT SQL AZURE TABELLEN-AUFBAU Sychronisation

Slide 12

Slide 12 text

ZUGRIFF Table SyncTable SERVICE DEVICE LOCAL DB REMOTE DB

Slide 13

Slide 13 text

SYNCHRONIZATION MOBILE BACKEND DATABASE CROSS-PLATFORM APP PUSH NOTIFICATIONS OFFLINE-SUPPORT MONITORING SECURITY private void GetData() { var mobileService = new MobileServiceClient( new Uri("https://myapp.azurewebsites.net/")); var table = mobileService.GetTable(); var items = await table .Where(item => item.Complete == false) .ToCollectionAsync(); list.ItemsSource = items; } MobileServiceClient / IMobileServiceTable public class TodoItemController : TableController { public IQueryable GetAllTodoItems() { … } public SingleResult GetTodoItem(string id) { … } public Task PatchTodoItem( string id, Delta patch) { … } public async Task PostTodoItem( TodoItem item) { … } public Task DeleteTodoItem(string id) { … } } TableController

Slide 14

Slide 14 text

DEMO ZUGRIFF VOM CLIENT

Slide 15

Slide 15 text

OFFLINE SUPPORT FUNKTIONSWEISE ▪ Transparenter Zugriff auf Daten (online/offline) ▪ Daten werden in lokaler Queue gehalten und autom. synchronisiert wenn Device wieder online ist ▪ Integrierte Konflikterkennung

Slide 16

Slide 16 text

DEMO OFFLINE SUPPORT

Slide 17

Slide 17 text

ANALYTICS LOCAL TESTING ▪ Der Service kann lokal ausgeführt werden REMOTE DEBUGGER ▪ Es kann ein Debugger auf den Azure Service attached werden DIAGNOSTIC LOGGING ▪ Logging für App Service & Web Server ▪ Konfiguration: Monitoring/Diagnostic logs LOG STREAM ▪ Realtime Tracing ▪ Aktivierung: Monitoring/Log stream

Slide 18

Slide 18 text

DEMO ANALYTICS

Slide 19

Slide 19 text

AUTHENTICATION VARIANTEN ▪ Client- und Server Flow PROVIDERS ▪ Facebook ▪ Twitter ▪ Google ▪ Microsoft ▪ Azure AD ▪ OAuth2 ▪ Custom GOOGLE FACEBOOK TWITTER MOBILE SERVICE DEVICE MICROSOFT

Slide 20

Slide 20 text

PUSH NOTIFICATIONS CROSS-PLATTFORM PUSH ▪ Zentralisierter Versand von Push Messages für die verschiedenen Plattformen ▪ Nutzt Azure Notification Hubs

Slide 21

Slide 21 text

DEMO AUTHENTICATION & PUSH

Slide 22

Slide 22 text

FAZIT Mobile Backends zu entwickeln ist keine leichte Aufgabe ▪ Offline Support, Security, Synchronisation, ... Azure Mobile Apps können helfen ▪ Hosting, Auth, Push Notifications, CI, ... Vorgefertigte Frameworks für Client & Server ▪ .NET, JavaScript, Native ▪ Open Source

Slide 23

Slide 23 text

Q & A

Slide 24

Slide 24 text

RESSOURCEN AZURE MOBILE APPS DEVELOPER CENTER ▪ https://azure.microsoft.com/en-us/services/app-service/mobile/ MOBILE APPS MIT XAMARIN: GET STARTED ▪ https://docs.microsoft.com/de-de/azure/app-service-mobile/app-service-mobile- xamarin-forms-get-started QUICKSTARTS FOR MICROSOFT AZURE MOBILE APPS ▪ https://github.com/Azure/azure-mobile-apps-quickstarts MOBILE APPS DEVELOPER FORUM ▪ https://social.msdn.microsoft.com/forums/azure/en-US/home?forum=azuremobile

Slide 25

Slide 25 text

RESSOURCEN WHAT ARE MOBILE APPS ▪ https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-value- prop-preview/ MOBILE APPS SDK ON GITHUB ▪ https://github.com/Azure/azure-mobile-apps EBOOK: DEVELOP CLOUD CONNECTED MOBILE APPS ▪ https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/ VIDEO: AZURE MOBILE APPS ENTWICKELN UND DEBUGGEN ▪ https://www.microsoft.com/germany/techwiese/know- how/video.aspx?id=msdn_de_68745

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content