Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
lawrence_shaun_introducing_net_maui_build_and_deploy_crosspl.pdf
Скачиваний:
46
Добавлен:
26.06.2023
Размер:
5.15 Mб
Скачать

Chapter 1 Introduction to .NET MAUI

to take the pragmatic approach of taking a step back and evaluating all the pain points that existed for themselves as maintainers and (more importantly) for us as developers using the framework.

Not only do we therefore gain improvements from the Xamarin framework as part of this evolution, but we also get all the goodies that come with .NET such as powerful built-in dependency injection, better performance, and other topics that I will touch on throughout this book. This makes me believe that this mature cross-platform framework has finally become a first-class citizen of the .NET and Microsoft ecosystems. I guess the clue is in the first part of its new name.

On the topic of its name, .NET MAUI implies that it is a UI framework, and while this is true, this is not all that the framework has to offer. Through the .NET and the .NET MAUI platform APIs, we are provided with ways of achieving common application tasks such as file access, accessing media from the device gallery, using the accelerometer, and more. The

.NET MAUI platform APIs were previously known as Xamarin Essentials, so if you are coming in with some Xamarin Forms experience, they should feel familiar. I will touch on much more of this functionality as you progress through this book.

How It Differs From the Competition

.NET MAUI provides its own controls (for example, a Button) and then maps them to the relevant implementation on each platform. To continue with the example of a button, this is a UIButton from UIKit on iOS and macOS, an AppCompatButton from AndroidX.AppCompat.Widget on Android, and a Button from Microsoft.UI.Xaml.Controls on Windows. This gives a great level of coverage in terms of providing a common implementation that works across all platforms. With the introduction of the .NET MAUI handler architecture (which will we be looking at in more detail in Chapter 11) we truly gain the power to tweak the smallest of implementation details on a per-platform basis. This is especially useful

7