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 now! 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
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
.NET MAUI for C# Developers

You're reading from   .NET MAUI for C# Developers Build cross-platform mobile and desktop applications

Arrow left icon
Product type Paperback
Published in Mar 2023
Publisher Packt
ISBN-13 9781837631698
Length 296 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Rodrigo Juarez Rodrigo Juarez
Author Profile Icon Rodrigo Juarez
Rodrigo Juarez
Jesse Liberty Jesse Liberty
Author Profile Icon Jesse Liberty
Jesse Liberty
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1 – Getting Started
2. Chapter 1: Assembling Your Tools and Creating Your First App FREE CHAPTER 3. Chapter 2: What We Will Build: Forget Me Not 4. Chapter 3: XAML and Fluent C# 5. Chapter 4: MVVM and Controls 6. Chapter 5: Advanced Controls 7. Chapter 6: Layout 8. Part 2 – Intermediate Topics
9. Chapter 7: Understanding Navigation 10. Chapter 8: Storing and Retrieving Data 11. Chapter 9: Unit Testing 12. Part 3 – Advanced Topics
13. Chapter 10: Consuming REST Services 14. Chapter 11: Exploring Advanced Topics 15. Assessments 16. Index 17. Other Books You May Enjoy

Assembling Your Tools and Creating Your First App

In this book, we’ll be building iOS, Android, Windows, and Mac applications using one common code base. Everything you need is free unless you want to build for iOS and Mac, in which case you need a Mac computer. I’m going to assume you have a Mac, but if you don’t, very little will change; you’ll just be more limited in the platforms you can deploy to.

An alternative if you don’t have a Mac

James Montemagno of Microsoft has a workaround video if you don’t have a Mac. There are severe limitations, but needs must. My personal recommendation is that if you don’t have a Mac, do your development with Android. Here’s the video: https://www.youtube.com/watch?v=snQ1C6Cppr8.

In the coming chapters, you will see a non-trivial .NET MAUI project that we will build incrementally. Along the way, we will examine how to create the User Interface (UI) with XAML (a markup language) and C#.

MAUI Blazor

An alternative, not covered in this book, is to use MAUI Blazor, which allows you to create a cross-platform application using your Blazor skills. You can learn more about MAUI Blazor at https://bit.ly/MauiBlazor.

In the first part of the book, we will discuss the principal architecture for .NET MAUI: Model-View-ViewModel (MVVM). We will then dive into the diverse controls available for creating powerful UIs followed by a chapter dedicated to techniques for laying out these controls on the page.

We will move on to discussing the Shell navigation architecture and how you move from page to page, passing along data as needed. We’ll look at persisting data and then stop to discuss the all-important topic of testing your code.

While .NET MAUI provides a cornucopia of controls, there are times when you need something that Microsoft did not anticipate, so we’ll dedicate a chapter to creating custom controls. (Once you have a custom control, you can use it in any subsequent .NET MAUI projects you work on.)

In the final section of the book, we’ll look at consuming a REST API and creating a web frontend to the same REST API we used for the mobile and desktop applications, this time using Blazor.

In this chapter, you will learn how to get and install Visual Studio for writing the program and Git for managing and safeguarding your code. Each chapter’s final code will be in a dedicated branch, with the final product in the main branch.

In this chapter, you will find the following:

  • A description of Visual Studio, along with installation instructions
  • A description of Git, along with installation instructions
  • A description of how to create your first, out-of-the-box program, and a tour of the files in that project

App versus application

Since we will be building for iOS and Android (which refer to apps) and also Windows and Mac (which refer to applications), I’ll be using the two terms interchangeably.

Let’s get the software you need, and then set up Visual Studio.

You have been reading a chapter from
.NET MAUI for C# Developers
Published in: Mar 2023
Publisher: Packt
ISBN-13: 9781837631698
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime