7
Dependency Injection, Services, and Messaging
As we continue building our Recipes! app using .NET MAUI, we want to make the most of the MVVM design pattern. MVVM is great for keeping our code organized and also promotes industry-standard practices that make our code base more maintainable and testable. In this chapter, we will focus on two critical concepts that are central to a solid MVVM architecture: Dependency Injection (DI) and messaging. DI promotes separation of concerns and allows our code to be much more testable. Messaging helps us keep different parts of our code from getting tangled up with each other. It allows different areas of our app to talk to each other in a loosely coupled way. Both concepts are extremely important to ensure ...
Get The MVVM Pattern in .NET MAUI 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.