1 Introducing .NET MAUI


This chapter covers

  • What .NET MAUI is
  • How MAUI fits into .NET
  • Why you would use .NET MAUI to build desktop and mobile apps
  • Writing cross-platform UIs

.NET MAUI is here, and if you’re reading this book, you already know a thing or two about it. But how does it work, and how did we get here? In this chapter, we look at the architecture of .NET MAUI and get an overview of how it works. We also see how to use it to build cross-platform mobile and desktop apps. To begin, let’s look at the history of cross-platform development and see how .NET MAUI is the fulfilment of a dream at Microsoft over 20 years in the making.

1.1 How did we get here?

The dream of write once, run anywhere (WORA) cross-platform software began in earnest in 1996 with the release of the first version of Java by Sun Microsystems. Before Java, software developers could only write their code against APIs provided by the operating system. Java was different—not only was it a new programming language, but it was also a runtime with its own set of APIs, allowing developers to ignore the target platform or operating system. Sun provided a runtime for nearly every available operating system (called the Java Virtual Machine, or JVM), which meant developers didn’t have to worry about whether they were building a Windows application, a Unix application, a Linux application, or a Mac application. They were building a Java application.

1.2 What is .NET MAUI?

1.3 Cross-platform vs. “native” apps

1.4 .NET MAUI and the .NET ecosystem

1.5 .NET MAUI development paradigms