Book Image

Mastering Xamarin.Forms

By : Ed Snider
Book Image

Mastering Xamarin.Forms

By: Ed Snider

Overview of this book

Discover how to extend and build upon the components of the Xamarin.Forms toolkit to develop an 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. Discover how to extend and build upon the components of the Xamarin.Forms toolkit to develop an 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, geo-location, and the camera, as well as how to use these services 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—both the app logic through unit tests and the user interface using Xamarin’s UITest framework. Finally, we’ll integrate Xamarin Insights for monitoring usage and bugs to gain a proactive edge on app quality.
Table of Contents (17 chapters)

Xamarin Insights


Xamarin Insights is a product offered by Xamarin that provides both analytics and crash reporting in a single toolset. It is by far one of the best and most feature-rich tools on the market, and because it's made by Xamarin, it's very easy to use with apps built on the Xamarin platform. For the purposes of this book, we will leverage the Xamarin Insights tool to add analytics and crash reporting capabilities to our TripLog app. However, due to the loosely coupled nature we have implemented in our app, the concepts used in this chapter to use Xamarin Insights could be used for pretty much any other analytic or crash reporting tool that supports .NET.

Setting up Xamarin Insights

Using Xamarin Insights in your mobile app is pretty straightforward. You just need to include the Xamarin.Insights NuGet package in each of your projects and set your app up in the Xamarin Insights web-based dashboard at http://insights.xamarin.com/. When you set your app up, you will be given an API...