UI between Android and iOS • Share code, copy/paste forbidden • 100% dynamic data • Auto-refresh on all pages • Custom controls • No knowledge in native frameworks The Mission N° 8
/ Always up Your App could be the best one or appears like the best one. User eXperience will be the same but the underlying implementation (paradigm) will be different. Resilience and Quickness N° 22
Reduce the number of Http calls ◦ Grouping http requests into batch requests Custom implementation of batch request in PCL ◦ Scenario Driven Design API Resilience and Quickness N° 23
Catching network ◦ Avoid useless network calls MVVMCross Connectivity plugin • Anticipate user navigation / Use speculative requests ◦ Bootstrap your Apps ◦ Load in background the screens the user should see Resilience and Quickness N° 24
Don't ask for data you already get ◦ json - Cache Web Api response ◦ Images - Cache downloaded resources • Caches ◦ Local instance of noSQL databases like SQLite (Beware of Android N) ◦ file storage like MVVMCross plugin : DownloadCache Tips : Customize cache durations Beware of space usage and clean carefully Resilience and Quickness N° 25
of the System objects ◦ Depends of the platform Defensive code ◦ null pattern ◦ null test Resilience and Quickness N° 29 Multiple version ◦ API versions ◦ Apps versions
real devices • Website interface • Write tests in C# • Xamarin.UITest is the automation library • Require a dedicated build for iOS to include Calabash Xamarin Test Cloud N° 32
to do the autopsy ◦ Report ◦ User path ◦ Call stack ◦ Trends ◦ Status ◦ Version ◦ Additional data I’m able to reproduce the issue so I can fix it ! N° 49
issues ◦ API evolution not compatible (should not happen) • Technical issues ◦ Corrupted local database ◦ Disk full • Mobility issues ◦ Network issues (Subway) Xamarin Insight N° 50
Good points ◦ Convergence / Code sharing ◦ Dev C # => native Dev ◦ Sharing communities C #, Android, iOS If we had to do it again ◦ Keep Xamarin ◦ Stay closer as possible to iOS and Android paradigms ◦ Increasing complexity step by step, start simple Conclusion N° 53
• https://mvvmcross.wordpress.com/ • https://github.com/MvvmCross/MvvmCross links Betclic • Site Web : https://www.betclic.fr/sport/ • Web App : https://m.betclic.fr/sport/ Expekt • Site Web : https://en.expekt.com/sport/ • Web App : https://m.expekt.com/sport/
Communication web ➔ natif webView.AddJavascriptInterface(myInterfaceAndroid, "Android"); … [Export("mon_evenement")] [JavascriptInterface] public void monEvenement() { Execute(); }