Book Image

Mastering Cross-Platform Development with Xamarin

Book Image

Mastering Cross-Platform Development with Xamarin

Overview of this book

The main goal of this book is to equip you with the required know-how to successfully analyze, develop, and manage Xamarin cross-platform projects using the most efficient, robust, and scalable implementation patterns. This book starts with general topics such as memory management, asynchronous programming, local storage, and networking, and later moves onto platform-specific features. During this transition, you will learn about key tools to leverage the patterns described, as well as advanced implementation strategies and features. The book also presents User Interface design and implementation concepts on Android and iOS platforms from a Xamarin and cross-platform perspective, with the goal to create a consistent but native UI experience. Finally, we show you the toolset for application lifecycle management to help you prepare the development pipeline to manage and see cross-platform projects through to public or private release.
Table of Contents (19 chapters)
Mastering Cross-Platform Development with Xamarin
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Patterns and best practices


In this section, we will discuss several implementation patterns and tools that developers generally resort to while developing Xamarin.Forms applications. Messaging and dependency injection features will be discussed further in Chapter 9, Reusable UI Patterns.

Messaging infrastructure

In an ideal implementation of the Model-View-ViewModel (MVVM) or Model-View-Presenter (MVP) pattern, each screen is self-contained; the screen modules for the view, model, and the mitigation components communicate with each other using various communication channels.

However, in complex applications, there is sometimes the need for a communication channel between these self-contained elements, since the result of an action on one of the screens should be propagated to other unrelated section(s) of the application with a shared interest in the result of this very action. As a solution to this problem, in MVVM frameworks such as MVVMCross, Prism, or MVVM Light, it is common to see an...