Part 1. Getting started with Xamarin

The traditional way to build a mobile app is to write it twice: once in Objective-C or Swift for iOS, and then again in Java for Android. This is a huge waste of time, duplicating code across two languages. Luckily some of the most innovative engineers in the world (according to Time magazine) have a solution—Xamarin.

Xamarin is a platform from Microsoft that allows you to build and ship iOS and Android apps using .NET. It’s also part of a thriving mobile ecosystem containing everything from mobile-specific cloud resources from Microsoft, DevOps tools, and a huge community of open source software. At its most basic, it’s a way to use the same language and technology across iOS and Android, allowing you to reuse large amounts of code and third-party libraries across two very different mobile platforms. The best practices around Xamarin are focused on keeping this amount of code-sharing as large as possible.

This first part of the book covers the architectural concepts behind a well-written cross-platform Xamarin app, focusing on the incredibly popular MVVM design pattern. A good architecture will help you reuse the most code possible, so it’s worth investing the time to learn these concepts, avoiding wasting time writing swathes of code twice. Patterns such as MVVM allow you to test your code faster and easier using unit tests, catching bugs earlier in the development cycle and reducing the time manually testing (and bug fixing) further down the development cycle. These are the foundations you’ll need to build production-quality mobile apps.

Chapter 1 starts by discussing Xamarin and the benefits of building Xamarin mobile apps. It also looks at the development lifecycle, covering all the steps in building production-quality mobile apps.

Chapter 2 looks at the MVVM design pattern as a way to increase your code reuse, and to build a well-architected, testable app. Then it covers the creation of a Hello World app that uses a popular MVVM framework.

Chapter 3 dives into MVVM in more detail, looking at the different layers from model, through view model, to view. It then covers the application layer and navigation patterns.

Chapter 4 revisits the example Hello World app from chapter 2, diving deeper into how the MVVM design pattern was used to build the app. It then looks at expanding the app, using cross-platform Xamarin plugins.

Chapter 5 is all about multithreading, covering the threading considerations involved in building mobile apps. It also introduces async and await, a feature of C# that makes it very easy to build clean and easy-to-read multithreaded code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.107.241