Architecture design with Model-View-ViewModel (MVVM) pattern

The key aspect of using Xamarin is sharing code, classic approach or Xamarin.Forms you'll have to put all the business logic, navigation, dialogs, and data representation in a place that you can reuse and share. This problem is solved using the MVVM pattern and Xamarin.Forms is a perfect fit for it.

The MVVM architectural pattern is a variation of the Model-View-Controller (MVC) pattern and both are presentation patterns. Although MVVM can be achieved without data binding, the real power is when the platform supports it; the code is much simplified when we are using MVVM and data binding, hence it is natural to use MVVM with XAML-based applications like Xamarin.Forms, Windows Store, Windows ...

Get Xamarin: Cross-Platform Mobile Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.