Rules to Better .NET MAUI (was Xamarin)

Want to build Windows Desktop Applications? Check SSW's MAUI Apps consulting page.

  1. If you need to build a binary app (rather than a web app) that will run on multiple platforms (e.g. iOS, Android, macOS, Windows), you can either build and maintain multiple versions of the app - one for each platform - or you can use a cross-platform (cross compiler) framework to build one app that runs on all of them.

  2. Picking the right development environment is important, and which platforms you want to target will influence that decision.

  3. The following is a list of resources for learning, staying up to date with, and using .NET MAUI.

  4. .NET MAUI and Xamarin has been adhering to the MVVM design pattern since their inception. While .NET MAUI provides developers with additional flexibility by adopting the MVU pattern (see: Introducing .NET Multi-platform App UI), MVVM remains a widely popular approach for architecting mobile applications.

  5. .NET MAUI provides several ways to optimize an Android application. Some of them complement each other while others can be mutually exclusive. It's important to understand what options you have at hands and how they affect your application.

  6. Developing mobile apps presents unique challenges compared to web or desktop development. One of the problems is that when using MVVM or using dynamic data on a page, you need to run your app to populate the data and see what your UI will actually look like.

  7. UPDATE: XAML Previewer was deprecated in Visual Studio 2019. For .NET MAUI use Hot Reload

    The XAML previewer in Visual Studio is a useful tool for designing your Xamarin UI. One limitation is that often your controls are bound to properties in your ViewModel (see rule Do you use the MVVM pattern?), meaning that you can't see what your UI will look like with the data loaded, without building and running your app.

  8. Branding is important in any product, and especially a mobile app. Xamarin offers several ways to define and ensure consistent styling throughout your app:

  9. Any changes you make to your app risks breaking existing functionality. Having a suite of automated tests that you can run prior to any release reduces the risk of releasing a product with new features that don't work, or that breaks existing features. It also means that you can run these tests as part of your CI/CD pipeline.

  10. .NET MAUI (Multi-platform App UI) is a framework that enables developers to create cross-platform applications for different devices efficiently. However, the efficiency of this framework could mean nothing if the developed apps are not tested on various devices, especially the older once.

per page
1 - 10 of 10 items
We open source.Loving SSW Rules? Star us on GitHub. Star