9 The MVVM Pattern

This chapter covers

  • The Model, View, ViewModel (MVVM) paradigm
  • The problems that MVVM solves in complex apps
  • Making controls MVVM friendly with behaviors

The Model, View, ViewModel (MVVM) pattern was introduced by Microsoft with Windows Presentation Foundation and has become the standard for apps developed using XAML. It’s a popular pattern with enough nuance that entire books have been dedicated to the subject. This chapter will provide an introduction, and as you progress through your .NET MAUI journey, you may find that you want to explore this topic in more depth.

The use of the MVVM pattern is, in some ways, more of an art than a science. You should aim to understand the rules about separating UI logic, presentational ...

Get .NET MAUI in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.