Book Image

Xamarin 4 By Example

By : Engin Polat, Mark Radacz
Book Image

Xamarin 4 By Example

By: Engin Polat, Mark Radacz

Overview of this book

The mobile app market is increasing exponentially every year. Xamarin Studio with its modern and powerful IDEs makes creating applications a lot easier by simplifying the development process. Xamarin will allow you and your team to create native applications by taking advantage of one of the most evolved programming language in the world: C#. This book will provide you with the basic skills you need to start developing mobile apps using C# and Xamarin. By working through the examples in each chapter, you will gain hands-on experience of creating a complete app that is fully functional by all means. Finally, you will learn to publish the app you created on the app market. Each project in this book will take you one step closer to becoming a professional app developer.
Table of Contents (16 chapters)
Xamarin 4 By Example
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
7
Monkey Puzzle Game – Processing Images

Chapter 2. Sharing Code between Platforms

As we mentioned in the previous chapter, in mobile development there are features that we can share between platforms and features that need to be platform specific.

In this chapter we will explore all the ways we have in Xamarin to share code between platforms.

We will understand and develop a cross-platform pattern called Model-View-View-Model (MVVM) that helps us to separate the business and presentation logic of our application from its user interface. We will use this paradigm in the rest of the book.

Note

The business logic is the part of a program that determines how data can be displayed, stored, created and changed.

The presentation logic is the part of the program that describes how and when business objects are displayed.

MVVM will help us to make our application easier to test, maintain and evolve. It also improves the amount of code we can share between platforms.

It is important to understand that MVVM and separated logics is not the only...