Search icon CANCEL
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
The MVVM Pattern in .NET MAUI

You're reading from   The MVVM Pattern in .NET MAUI The definitive guide to essential patterns, best practices, and techniques for cross-platform app development

Arrow left icon
Product type Paperback
Published in Nov 2023
Publisher Packt
ISBN-13 9781805125006
Length 386 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Pieter Nijs Pieter Nijs
Author Profile Icon Pieter Nijs
Pieter Nijs
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: Key Concepts and Components
2. Chapter 1: What Is the MVVM Design Pattern? FREE CHAPTER 3. Chapter 2: What is .NET MAUI? 4. Chapter 3: Data Binding Building Blocks in .NET MAUI 5. Chapter 4: Data Binding in .NET MAUI 6. Chapter 5: Community Toolkits 7. Chapter 6: Working with Collections 8. Part 2: Building a .NET MAUI App Using MVVM
9. Chapter 7: Dependency Injection, Services, and Messaging 10. Chapter 8: Navigation in MVVM 11. Chapter 9: Handling User Input and Validation 12. Chapter 10: Working with Remote Data 13. Part 3: Mastering MVVM Development
14. Chapter 11: Creating MVVM-Friendly Controls 15. Chapter 12: Localization with MVVM 16. Chapter 13: Unit Testing 17. Chapter 14: Troubleshooting and Debugging Tips 18. Index 19. Other Books You May Enjoy

What this book covers

Chapter 1, The MVVM Design Pattern, provides an overview of the core components of the MVVM pattern, showing their roles and interplay. It illustrates the value of separating UI from logic for better testability and maintenance. It addresses common MVVM misconceptions and offers a foundational grasp of MVVM, regardless of specific technology.

Chapter 2, What Is .NET MAUI?, gives an overview of the overarching landscape of .NET MAUI, its pivotal features and advantages, and its architecture. It provides insights into .NET MAUI’s origins from Xamarin and Xamarin Forms, and its evolutionary journey.

Chapter 3, Data Binding Building Blocks in .NET MAUI, shows how data binding in .NET MAUI, a cornerstone for MVVM, is an essential part of .NET MAUI. This chapter unpacks the key principles, elements, and techniques underpinning this essential feature.

Chapter 4, Data Binding in .NET MAUI, builds upon the previous chapter but delves deeper into its intricacies and nuances, offering a comprehensive exploration of all the aspects of data binding in .NET MAUI.

Chapter 5, Community Toolkits, zeros in on two influential community toolkits: the MVVM Toolkit and the .NET MAUI Community Toolkit. It shows how these community-driven initiatives can amplify the effectiveness of MVVM in your .NET MAUI applications.

Chapter 6, Working with Collections, provides an overview of how to effectively display datasets using MVVM in .NET MAUI. From binding data and adapting to its changes to crafting data templates, this chapter offers an MVVM-centric guide to presenting data and facilitating user interactions with it.

Chapter 7, Dependency Injection, Services, and Messaging, illuminates the methods of aligning a ViewModel with a view via service registration and dependency injection. It highlights the nuances of injecting services into a ViewModel and facilitating seamless communication between ViewModels using messaging, all while upholding separation of concerns and enhancing testability.

Chapter 8, Navigation in .NET MAUI, is all about MVVM-based navigation. This chapter provides an overview of what .NET MAUI Shell is and its implications for navigation. It shows how to construct a navigation service tailored for both .NET MAUI apps that leverage Shell and apps that don’t.

Chapter 9, Handling User Input and Validation, shows how to effectively handle user input, from validating data at the ViewModel level, standard and custom validation rules, to prompting the user for confirmations or cancellations in the presence of unsaved changes.

Chapter 10, Working with Remote Data, shows how to work with remote data, introduces repositories for maintaining separation of concerns, and utilizes dependency injection. It illustrates how to use Refit for streamlined API interactions, and how to handle asynchronous tasks and their UI implications.

Chapter 11, Creating MVVM-Friendly Controls, dives into the creation of custom controls that are tailored for MVVM, supporting data binding and interactivity through commands.

Chapter 12, Localization with MVVM, provides an overview of the techniques to localize hardcoded labels within the app, and how to effectively fetch language-specific data from APIs.

Chapter 13, Unit Testing, shows how easy and essential unit testing is. It guides you through setting up a unit test project, generating data, mocking dependencies, and testing MAUI code.

Chapter 14, Troubleshooting and Debugging Tips, highlights common hiccups and their solutions. It shows typical issues and pitfalls concerning data binding, dependency injection, and building custom controls and converters.

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 €18.99/month. Cancel anytime