Book Review: Enterprise Application Patterns Using Xamarin.Forms
The Enterprise Application Patterns using Xamarin.Forms book by David Britch is available as a free download on the Microsoft's .NET Architecture Guides website. It's a short book with just under 100 pages, accompanied by a sample application implementing the described architectural approaches. The latter is updated more regularly than the book. It's therefore slightly out-of sync but not enough to be a serious issue.
The book focuses on various aspects of the MVVM (model-view-viewmodel) architectural pattern which is strongly recommended for all applications using Xamarin.Forms or other XAML based UI frameworks. No MVVM libraries are used. Instead, all the helper classes that are necessary to efectively use MVVM with Xamarin.Forms are implemented in the sample application and explained in the book. This will give the readers a better understanding of what is happening under the hood when they use an MVVM library of choice in their application. There's a big emphasis on decoupling different parts of the application and the benefits it brings, including easier unit testing.
In addition to MVVM-related topics, the book includes detailed coverage of interaction with REST services including authentication, caching, and even the circuit-breaker pattern. There's also a chapter and a half about the server-side implementation. Although that's not directly related to Xamarin.Forms or mobile applications, it can be helpful in better understanding of related client-side concerns and isn't that much of a distraction.
What I missed the most was any kind of guidance on how to structure business/domain logic in the mobile application. To some extent, this makes sense because the sample application has almost no business logic of its own. It mostly just interacts with REST services. However, this is not necessarily true for all mobile applications. Therefore, a chapter or two about domain layer architecture inside a mobile application would be a welcome addition.
I found the book to be a good introduction to MVVM. It can also serve as a refresher for someone with past MVVM experience who hasn't worked with Xamarin.Forms before. Although the sample code uses Xamarin.Forms, it's almost just as useful to WPF and UWP developers.