I’ve decided to dabble a bit in MonoDroid and MonoTouch and port one of my WP7 apps as a starter. I would really like to reuse my existing ViewModels but since both Android and iOS seem to have no such thing as XAML’s strong databinding I would like to ask if anyone went that route before and can recommend some best practices or existing solutions.
Share
We’re doing this with an application right now, but writing for iOS first (even before Windows). It is not full of rainbows and ponies for sure.
I would recommend the following:
#if iPhonedirective. INotifyPropertyChanged or ICommand are examples.#if iPhoneand#if Androidstatements possible.I know you are working with an existing application, so it’s tough. It may be simpler to just reuse your business model and that’s it. Android and iOS have MVC patterns of their own, and are drastically different from WPF. You might also only need a subset of each ViewModel on mobile devices, which could make it easier to just rewrite.
In our case: