Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
.NET MAUI Projects - Third Edition

You're reading from  .NET MAUI Projects - Third Edition

Product type Book
Published in Feb 2024
Publisher Packt
ISBN-13 9781837634910
Pages 630 pages
Edition 3rd Edition
Languages
Authors (3):
Michael Cummings Michael Cummings
Profile icon Michael Cummings
Daniel Hindrikes Daniel Hindrikes
Profile icon Daniel Hindrikes
Johan Karlsson Johan Karlsson
Profile icon Johan Karlsson
View More author details

Table of Contents (18) Chapters

Preface 1. Part 1: Introduction
2. Chapter 1: Introduction to .NET MAUI 3. Chapter 2: Building Our First .NET MAUI App 4. Chapter 3: Converting a Xamarin.Forms App into .NET MAUI 5. Part 2: Basic Projects
6. Chapter 4: Building a News App Using .NET MAUI Shell 7. Chapter 5: A Matchmaking App with a Rich UX Using Animations 8. Chapter 6: Building a Photo Gallery App Using CollectionView and CarouselView 9. Chapter 7: Building a Location Tracking App Using GPS and Maps 10. Chapter 8: Building a Weather App for Multiple Form Factors 11. Part 3: Advanced Projects
12. Chapter 9: Setting Up a Backend for a Game Using Azure Services 13. Chapter 10: Building a Real-Time Game 14. Chapter 11: Building a Calculator Using .NET MAUI Blazor 15. Chapter 12: Hot Dog or Not Hot Dog Using Machine Learning 16. Index 17. Other Books You May Enjoy

Using MVVM – creating views and ViewModels

Model-View-ViewModel, or MVVM for short, is all about separation of concerns. It is an architectural pattern that defines three parts, each of which has a specific meaning:

  • Model: This relates to anything that represents data and that can be referenced with ViewModel.
  • View: This is the visual component. In .NET MAUI, this is represented by a page.
  • ViewModel: This is the class that acts as the glue between the model and the view.

We are introducing MVVM here because the MVVM pattern was designed specifically around XAML-based GUIs. This app and the rest of the apps in this book will use XAML to define the GUI and we will use the MVVM pattern to separate the code into the three aforementioned parts.

In this app, we could say that the model is the repository and the to-do list items it returns. ViewModel refers to this repository and exposes properties that the view can bind to. The ground rule is that any logic...

lock icon The rest of the chapter is locked
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 $15.99/month. Cancel anytime}