mvvm pattern in xamarin - mvvmcross and xamarin.forms
TRANSCRIPT
MVVMpatternasawayofcreatinglooselycoupled,maintainableandtestableXamarin apps
Sylwester [email protected]
Xamarin Platform
ü NativeUI,nativeAPIaccess,andnativeperformance
ü AnythingyoucandoinObjective-C,Swift,orJavayoucandoinC#withXamarin
ü Shipcutting-edgeappswithsame-daysupportfornewOSreleases
Xamarin TestCloud
ü Testsbehaveasusersdo–performingtaps,pinches,swipes,andmore
ü IntegrateswithCIforcontinuousautomatedtesting,testingappsoneverychange
ü Ensuresappslookandfeelexcellentwithfull-framescreenshotsandvideoplayback
Xamarin Insights+HockeyApp
ü Getmeaningfulcrashreportswiththemostreliablecrashreportingonthemarket
ü Seehowyourappisusedandwhatyourtestershavealreadycovered
ü Communicatewithyourusersandgetfeedback,supportrequests,andbugreportsfromwithinyourapp
TraditionalXamarin Approach
ü Appsthatrequirespecializedinteractions
ü Appswithhighlypolisheddesign
ü Appsthatusemanyplatform-specificAPIs
ü AppswherecustomUIismoreimportantthancodesharing
TraditionalXamarin Approach
v Createyourownframework
• SharedProject
• PortableClassLibrary
vUseanexistingMVVMsolution
• Bind
• MVVMLight
• ReactiveUI
• MvvmCross
ProjectStyles
Xamarin.Forms Approach
ü Dataentryapps
ü Prototypesandproofs-of-concept
ü Appsthatrequirelittleplatform-specificfunctionality
ü AppswherecodesharingismoreimportantthancustomUI
Xamarin.Forms Approach
v Createyourownframework
• SticktoXamarin.Forms mechanisms(e.g.DependencyService,MessagingCenter)
• ImplementINotifyPropertyChangedandICommand
ProjectStyles
vUseanexistingMVVMsolution
• MugenMVVMToolkit
• MVVMLight
• FreshMvvm
• MvvmCross-Forms
• Prism
PrismforXamarin.Forms
ü MVVMSupport
ü Commanding
ü Messaging
ü Navigation
ü PageDialogService
ü Logging
ü DependencyInjection