The View Model Lifecycle in .NET MAUI

  Рет қаралды 1,037

SingletonSean

SingletonSean

Күн бұрын

Пікірлер: 13
@dasfahrer8187
@dasfahrer8187 4 ай бұрын
VM lifecycle has got to be of the more underappreciated and understudied systems in the .NET. It can cause so many headaches, bugs and general weirdness if someone hasn't properly and fully informed themselves of why it's there, how it works and when to take advantage of the steps.
@SingletonSean
@SingletonSean 4 ай бұрын
Definitely! Feel like it is even more tricky in .NET MAUI
@dasfahrer8187
@dasfahrer8187 4 ай бұрын
@@SingletonSean Sure seems like it, which doesn't help the 'interest factor' on it either. Thanks for taking the time to take the lumps for the rest of us 🤣
@his6214
@his6214 4 ай бұрын
Why can't View and ViewModel be set to Singleton at the same time? Will the page and information not be reloaded if I switch pages repeatedly?
@Jeremygrmn
@Jeremygrmn 7 ай бұрын
New digs!! Hahaha need some soft surfaces in there for the echo. Congrats on the new place! Again, Maui is just overall pretty clean
@SingletonSean
@SingletonSean 7 ай бұрын
Yep! And indeed, the echo is pretty rough lol. Gonna throw some foam panels up everywhere!
@flobuilds
@flobuilds 4 ай бұрын
I did something similar with virtual functions in a base viewmodel which can be overriden in each impl and also created a base content page which calls the functions directly. But the idea of using bindable commands sounds pretty interresting. Are these blocking calls or will they be async/fire and forget? So that the view doesn't hang on load
@SingletonSean
@SingletonSean 4 ай бұрын
Yep, these are non-blocking!
@flobuilds
@flobuilds 4 ай бұрын
@@SingletonSean thanks thats awesome need to implement that. Do you use custom "base" types like vm or pag or do you just implement that everywhere you need it?
@SingletonSean
@SingletonSean 4 ай бұрын
I use the MVVM Toolkit for all the base types (CommunityToolkit.MVVM). This includes base view models for INotifyPropertyChanged and classes for async commands. It's super helpful!
@flobuilds
@flobuilds 4 ай бұрын
@@SingletonSean i use that too thanks for the info. So you just implement the functions shown in the Video where you need them?
@ItsSalesGabriel
@ItsSalesGabriel 4 ай бұрын
Nice tip, tkss
Connect Your .NET MAUI Application to a Database
18:16
SingletonSean
Рет қаралды 3,2 М.
What's New in .NET 9 with Examples
25:02
Nick Chapsas
Рет қаралды 64 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Was I Wrong About Blazor? | Coding Shorts 111
16:35
Shawn Wildermuth
Рет қаралды 28 М.
MVVM vs. MVI - Understand the Difference Once and for All
18:40
Philipp Lackner
Рет қаралды 53 М.
WPF C# MVVM Sample Application
13:16
MpCodes
Рет қаралды 20 М.
Building a .NET MAUI Application in 7 Days
26:59
SingletonSean
Рет қаралды 2,3 М.
The Simplest Tech Stack
9:38
Awesome
Рет қаралды 140 М.
Why is everyone LYING?
7:56
NeetCodeIO
Рет қаралды 370 М.
SQLModel + FastAPI: Say Goodbye to Repetitive Database Code
19:50
A Better Way to Deal with Complex Bindings in XAML
5:15
SingletonSean
Рет қаралды 1,8 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 283 М.
Why SingletonSean?
5:39
SingletonSean
Рет қаралды 1,3 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН