Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
.NET MAUI Cross-Platform Application Development
.NET MAUI Cross-Platform Application Development

.NET MAUI Cross-Platform Application Development: Build high-performance apps for Android, iOS, macOS, and Windows using XAML and Blazor with .NET 8 , Second Edition

eBook
$9.99 $32.99
Paperback
$40.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

.NET MAUI Cross-Platform Application Development

Getting Started with .NET MAUI

Since the release of .NET 5, Microsoft has been trying to unify different .NET implementations into one .NET release. .NET Multi-platform App UI (or .NET MAUI) is the effort to provide a unified cross-platform UI framework. We will learn how to use .NET MAUI to develop cross-platform applications in this book.

The following is what we will cover in this chapter:

  • Overview of cross-platform technologies
  • Comparison of cross-platform technologies (.NET, Java, and JavaScript)
  • .NET landscape and the history of Xamarin
  • .NET MAUI features
  • .NET MAUI Blazor apps
  • What’s new in .NET 8 for .NET MAUI?
  • Development environment setup

If you’re new to .NET development, this chapter will help you to understand the .NET landscape. For Xamarin developers, many topics in this book may sound familiar; this chapter will give you an overview of what we will discuss in this book.

Overview of cross-platform and full stack technologies

.NET Multi-platform App UI, or .NET MAUI, is a cross-platform development framework from Microsoft for building apps that targets both mobile and desktop form factors on Android, iOS, macOS, Windows, and Tizen. It is one of a number of cross-platform frameworks available on the market.

Before discussing cross-platform technologies, let’s review the scope of application development first. This review will help us to understand the various cross-platform frameworks better.

Generally, software development can be divided into two categories – systems programming and application programming. Application programming aims to produce software that provides services to the user directly, whereas systems programming aims to produce software and software platforms that provide services to other software. In the .NET domain, the development of the .NET platform itself belongs to systems programming, whereas application...

Exploring the .NET landscape

Before we dive into the details of .NET MAUI, let’s have an overview of the .NET landscape. This is a section for those who are new to .NET. If you are a .NET developer, you can skip this section.

Since Microsoft introduced the .NET platform, it has evolved from a proprietary software framework for Windows to a cross-platform and open-source platform.

There are many ways to look at the .NET technology stack. Basically, it contains the following components:

  • Common infrastructure (compiler and tools suite)
  • Base Class Library (BCL)
  • Runtime (WinRT or Mono)

.NET Framework

The history of .NET started with .NET Framework. It is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. .NET Framework started as a future-oriented application framework to standardize the software stack in the Windows ecosystem. It is built around the Common Language Infrastructure (CLI) and...

Using Xamarin for cross-platform development

As we mentioned in the previous section, Xamarin was part of the Mono project and was an effort to support .NET on Android, iOS, and macOS. Xamarin exports the underlying operating system features to the .NET runtime. Xamarin.Forms is the cross-platform UI framework of Xamarin. .NET MAUI is an evolution of Xamarin.Forms. Before we discuss .NET MAUI and Xamarin.Forms, let us review the following diagram of Xamarin implementations on various platforms.

Figure 1.1: Xamarin implementations

Figure 1.1 shows the overall architecture of Xamarin. Xamarin allows developers to create native UIs on each platform and write business logic in C# that can be shared across platforms.

The transition from Xamarin to .NET MAUI, or more specifically from Xamarin.Forms to .NET MAUI, is not a revolution. .NET MAUI essentially represents a new version of Xamarin.Forms rather than other components of Xamarin. Xamarin.Android has now become...

Moving to .NET MAUI

With the .NET unification, Xamarin has become a part of the .NET platform, and Xamarin.Forms is integrating with .NET in the form of .NET MAUI.

.NET MAUI is a first-class .NET citizen with the namespace Microsoft.Maui.

Making the move to .NET MAUI is also an opportunity for Microsoft to redesign and rebuild Xamarin.Forms from the ground up and tackle some of the issues that have been lingering at a lower level. Compared to Xamarin.Forms, .NET MAUI uses a single project structure, supports hot reloads better and supports the MVU and Blazor development patterns.

It’s important to note that MVU is not currently available as a stable method for building apps with .NET MAUI; it has only been announced.

Figure 1.2 shows an architecture diagram of .NET MAUI; you can find it in the Microsoft documentation. From Figure 1.2, we can see that there is a common BCL for all supported operating systems. Under the BCL, there are two runtimes...

What’s new in .NET 8 for .NET MAUI?

.NET 8 introduced many new changes, and here we will review the aspects related to .NET MAUI.

Native AOT support for iOS-like platforms

.NET 8 introduces native AOT support for iOS-like platforms, allowing the building and running of .NET iOS and .NET MAUI applications on various platforms. Preliminary testing shows a 40% disk size decrease for .NET iOS apps and a 25% increase for .NET MAUI iOS apps using native AOT. However, as this is only the first step in support, performance conclusions should not be drawn yet. Native AOT support is an opt-in feature for app deployment, while Mono remains the default runtime for development and deployment.

.NET MAUI extension of Visual Studio Code

Although still in its preview stage, Visual Studio Code now offers a .NET MAUI extension, making it available for use in .NET MAUI development. The .NET MAUI extension is a new Visual Studio Code extension that lets you develop and debug your...

Development environment setup

In this section, we will introduce the development environment setup in Visual Studio and Visual Studio Code.

Using Visual Studio

Both Windows and macOS can be used for.NET MAUI development, but you won’t be able to build all the targets with only one of them. You will need both Windows and Mac computers to build all the targets. In this book, the Windows environment is used to build and test Android and Windows targets, while iOS and macOS targets are built on a Mac computer.

.NET MAUI apps can target the following platforms:

  • Android 5.0 (API 21) or higher
  • iOS 11 or higher
  • macOS 10.15 or higher, using Mac Catalyst
  • Windows 11 and Windows 10 version 1809 or higher, using Windows UI Library (WinUI) 3

.NET MAUI Blazor apps use the platform-specific WebView control, so they have the following additional requirements:

  • Android 7.0 (API 24) or higher
  • iOS 14 or higher
  • macOS 11 or...

Summary

In this chapter, we explored topics related to .NET MAUI and Xamarin, discussing various cross-platform technologies in comparison to .NET MAUI. This analysis provided insight into the advantages and disadvantages of different frameworks. Additionally, we compared the JavaScript and C# ecosystems, as most cross-platform frameworks utilize these languages. By introducing the .NET landscape and the available cross-platform frameworks, you now have a comprehensive understanding of the essentials before delving into the world of .NET MAUI.

In the next chapter, we will explore how to build a .NET MAUI application from scratch.

Further reading

Learn more on Discord

Join our community’s Discord space for discussions with the author and other readers:

https://packt.link/cross-platform-app

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Handle data effectively with expanded coverage on the MVVM model and data binding
  • Integrate platform-specific code using plugins and custom controls
  • Migrate from Xamarin.Forms to .NET MAUI for the latest hybrid app development capabilities

Description

An evolution of Xamarin.Forms, .NET MAUI is a cross-platform framework for creating native mobile and desktop apps with C# and XAML. Using .NET MAUI, you can develop apps that’ll run on Android, iOS, macOS, and Windows from a single shared codebase. In this revised edition of .NET MAUI Cross-Platform Application Development you will be introduced to .NET 8 and get up to speed with app development in no time. The book begins by showing you how to develop a cross-platform application using .NET MAUI, including guidance for migrating from Xamarin.Forms. You’ll gain all the knowledge needed to create a cross-platform application for Android, iOS, macOS, and Windows following an example project step by step. As you advance, you’ll integrate the latest frontend technology into your app using Blazor components, including the new Blazor Bindings feature. After this, you’ll learn how to test and deploy your apps. With new coverage on creating mock .NET MAUI components, you can develop unit tests for your application. You will additionally learn how to perform Razor component testing using bUnit. By the end of this book, you’ll have learned how to develop your own cross-platform applications using .NET MAUI.

Who is this book for?

This book is for mobile developers interested in cross-platform application development with working experience of the .NET Core framework, as well as junior engineers who’ve just begun their career in mobile app development. Native app developers (desktop) or Xamarin developers who want to migrate to .NET MAUI will also benefit from this book. Basic knowledge of modern object-oriented programming languages, such as C#, Java or Kotlin, is assumed.

What you will learn

  • Develop high-performance apps with logical user interfaces
  • Improve the maintainability of apps using the MVVM design pattern
  • Understand the progression from Xamarin.Forms and how to migrate to .NET
  • Delve into templated components and Razor class libraries for crafting Blazor UI elements
  • Publish your creations to major app stores with guidance on preparation and processes
  • Extend your testing repertoire with bUnit for Razor components for reliable unit testing

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 25, 2024
Length: 496 pages
Edition : 2nd
Language : English
ISBN-13 : 9781835082843
Vendor :
Microsoft
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 25, 2024
Length: 496 pages
Edition : 2nd
Language : English
ISBN-13 : 9781835082843
Vendor :
Microsoft
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 142.97
.NET MAUI Cross-Platform Application Development
$40.99
.NET MAUI Projects
$51.99
Web Development with Blazor
$49.99
Total $ 142.97 Stars icon
Banner background image

Table of Contents

17 Chapters
Part 1: Exploring .NET MAUI Chevron down icon Chevron up icon
Getting Started with .NET MAUI Chevron down icon Chevron up icon
Building Our First .NET MAUI App Chevron down icon Chevron up icon
User Interface Design with XAML Chevron down icon Chevron up icon
Exploring MVVM and Data Binding Chevron down icon Chevron up icon
Navigation Using .NET MAUI Shell and NavigationPage Chevron down icon Chevron up icon
Software Design with Dependency Injection Chevron down icon Chevron up icon
Using Platform-Specific Features Chevron down icon Chevron up icon
Part 2: Implementing .NET MAUI Blazor Chevron down icon Chevron up icon
Introducing Blazor Hybrid App Development Chevron down icon Chevron up icon
Understanding Blazor Routing and Layout Chevron down icon Chevron up icon
Implementing Razor Components Chevron down icon Chevron up icon
Part 3: Testing and Deployment Chevron down icon Chevron up icon
Developing Unit Tests Chevron down icon Chevron up icon
Deploying and Publishing in App Stores Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(17 Ratings)
5 star 64.7%
4 star 23.5%
3 star 5.9%
2 star 0%
1 star 5.9%
Filter icon Filter
Top Reviews

Filter reviews by




Giuseppe Nov 09, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very useful for a beginners in .NET MAUI technology.
Subscriber review Packt
A. Zubarev Apr 21, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
One of the best among the few books on cross-platform development.It is fascinating and something a developer back say 10 years ago would not imagine could be possible: to develop a web app once and be able to run on any OS, or almost any mobile device.This is possible for some time now using not even one technology and a book just like this.The book covers in brief all the major cross-platform development frameworks, but concentrates in depth on MAUI (Multi-platform App UI), a successor to Xamarin Forms.I was impressed how well it is covered!Even though I have not tried yet to code a pet project I felt confident I will be able to.The author teaches also on good software development practices, unit testing, and ultimately how to deploy to an application store.If one would ask how you could criticize this work, I would say one is to add in the new edition more on covering the Cloud ops/deploying to one or better more providers (the book does discuss some deployment to Azure to be honest), and also on integration with AI as Copilot, Cognito (AWS) or alike.Anyways, a great and solid book to get good grips on the modern web development.
Amazon Verified review Amazon
Amazon Customer May 16, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I recently was asked to read and review this .Net MAUI Cross-Platform Application Development book. I have been a Xamarin/.Net MAUI developer since 2015 and built Windows tablet applications previous to that. I have also served as the technical reviewer on two other Packt books.Over last couple years, the Xamarin community has been going through an upheaval with the migration to .Net MAUI and our beloved Visual Studio for Mac IDE retiring. Much of the information that developers in this community have lived by has been pieced together from websites, blog posts, and trial and error. I was extremely impressed how this book approached the migration and went into thoughtful detail. The author gave an overview of where .Net MAUI now sits in the landscape of cross-platform technologies that I thought was fascinating. It was a really strong way to open a technical book.The author actually suggests that the book is intended for front-end developers or native app developers who are interested in cross platform technology. I agree that these folks would be a good audience, but honestly, I picked up a number of things from this book. I liked how the author often gave both the IDE method and the dotnet command for accomplishing the same thing. I appreciated that the author decided to use the MVVM Toolkit to walk through MVVM. I feel like this is a fundamental concept that sometimes gets lost when devs rely upon a MVVM framework too heavily. It is so important to know INPC and Commanding inside and out, especially when building larger mobile apps. I also appreciated that the author devoted a whole section to .Net MAUI Blazor. Blazor is new to Xamarin (now .Net MAUI) devs, but it is something that should not be too far outside of our comfort zone.In short, this is a fantastic book and an instant classic.
Amazon Verified review Amazon
Sara Granados Apr 24, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
".NET MAUI Cross-Platform Application Development" is essential reading for any developer interested in harnessing the full capabilities of .NET to create high-performance cross-platform apps. With its practical and thorough approach, this book offers invaluable guidance for mastering the art of cross-platform app development with .NET.
Amazon Verified review Amazon
Tone Apr 25, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
".NET MAUI: Cross-Platform Development Made Easy" is a guidebook that teaches developers how to create apps that work on multiple devices using .NET MAUI, a tool for building cross-platform applications. The book starts with the basics, like setting up the necessary software, and then moves on to more complex topics such as app design, handling data, and adding specific features for different platforms. Each of the twelve chapters builds on the previous ones, combining clear explanations with practical exercises to help readers understand how to build applications from start to finish.The book also covers how to test and launch the apps to make sure they run smoothly on various platforms like Android and iOS. It dives deep into technical areas like creating reusable components and designing efficient architecture, presented in a way that's manageable for both newcomers and experienced developers. This guide is particularly good for those who want to learn the latest techniques and improve their ability to develop high-quality apps efficiently.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.