Book Image

Mastering Xamarin.Forms - Second Edition

By : Ed Snider
Book Image

Mastering Xamarin.Forms - Second Edition

By: Ed Snider

Overview of this book

Discover how to extend and build upon the components of the Xamarin.Forms toolkit to develop effective, robust mobile app architecture. Starting with an app built with the basics of the Xamarin.Forms toolkit, we'll go step by step through several advanced topics to create a solution architecture rich with the benefits of good design patterns and best practices. We'll start by introducing a core separation between the app's user interface and the app's business logic by applying the MVVM pattern and data-binding. Then we will focus on building out a layer of plugin-like services that handle platform-specific utilities such as navigation and geo-location, as well as how to loosely use these services in the app with inversion of control and dependency injection. Next we'll connect the app to a live web-based API and set up offline synchronization. Then, we'll dive into testing the app logic through unit tests. Finally, we will setup Visual Studio App Center to automate building, testing, distributing and monitoring the app.
Table of Contents (11 chapters)

Preface

Xamarin released the Xamarin.Forms toolkit in the summer of 2014, and it has since become a very popular framework for .NET mobile app developers. On the surface, Xamarin.Forms is a user interface toolkit focused on abstracting the platform-specific UI APIs of iOS, Android, and Windows into a single easy-to-use set of APIs. In addition, Xamarin.Forms also provides the common components of a Model-View-ViewModel (MVVM) framework, making it extremely easy and intuitive to bind data to a user interface.

Xamarin.Forms comes with several building blocks that are paramount to a solid mobile app architecture, such as dependency injection, data binding, messaging, and navigation. However, many apps will quickly outgrow these in the box capabilities and require the use of more advanced and sophisticated replacements. This book will show you how to leverage the strengths of the Xamarin.Forms toolkit while complementing it with popular patterns and libraries to achieve a more robust and sustainable app architecture.

As with any framework or toolkit, there are specific scenarios where Xamarin.Forms might make more sense than others. Xamarin has done a great job of providing guidance and recommendations on when the use of Xamarin.Forms is appropriate versus when it might be a better decision to use the core Xamarin platform. Once you have made the decision to use Xamarin.Forms, this book will help guide you through using patterns and best practices with your Xamarin.Forms mobile app by walking you through an end-to-end example.