MVVM helper/base classes from TinyMvvm #990
Replies: 3 comments
-
Hey @dhindrik, thanks for your suggestion. IMHO, this looks like something that would be good to have in an MVVM framework, and (if nothing changed from the last time the team discuss it) we would like to avoid our toolkit following that path. |
Beta Was this translation helpful? Give feedback.
-
I think this is a great idea. Although, I agree, this should be in the mvvm package, I see a bug issue with that, because the implemtation of this would be very platform specific. Methods like So I guess it would make much mor sense to implent it in this toolkit. There is also a issue for Source Generators for BindableObjects, which is also very specific to mvvm and I guess that one could even be better in the mvvm toolkit (although not quite sure, I have to look into the proposal again). Today I was actually looking for a feature like the one proposed in this discussion and unfortunately there is nothing like this in any of the toolkits, which means I have to use one of the other mvvm toolkits like prism, mvvmcross or tinymvvm to get something that small just to be able to do work on appearing. So I would support this feature and I'd love to see it in the toolkit, for what it's worth. |
Beta Was this translation helpful? Give feedback.
-
Closed as per the Community Stand-up discussion here: https://youtu.be/N9wMcBP4jtg?t=2889 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In TinyMvvm I have some helper methods and properties in a ViewModel base class that makes life a bit easier when doing Mvvm. Compared with the first versions of TinyMvvm I have stripped away a lot of stuff for the MAUI version. But instead of having this code in a separate library it would be great to add it to the community toolkit so more devs can use it easier and to reuse the amount of dependencies. Maybe it should be a separate package because it has dependencies to CommuniytToolkit.Mvvm. Even if it is Mvvm it should be in the MAUI Community toolkit, because the code is specific to MAUI.
To get an ide about the implementation, you can look here. The implementations will be cleaner because I don't think everything should there should be included.
New classes/interfaces
ViewBase will not have any new properties or methods, just a few overrides that trigger methods in the ViewModel.
IViewModelBase
TinyMvvm also have methods for OnApplicationSleep and OnApplicationResume, but that requires a custom Application class, even if it nice I don't know if it is the right way to do it in the community toolkit.
Beta Was this translation helpful? Give feedback.
All reactions