AvaloniaUI / Avalonia.Markup.Declarative

Provides helpers for declarative ui in C#
372 stars 21 forks source link

[Emhancement] Split MVU and MVVM into seperated projects #24

Closed BaseCrusher closed 1 year ago

BaseCrusher commented 1 year ago

I think there might be people that would like to use the Markup functionality without having to use the MVVM or MVU this project introduces.

gritsenko commented 1 year ago

I think there might be people that would like to use the Markup functionality without having to use the MVVM or MVU this project introduces.

It's only sample projects use MVVM and MVU terminology, and the library itself doesn't force you to use anything of it. Or explain what do you mean?

BaseCrusher commented 1 year ago

I know that library does not force you to use MVVM or MVU. But considering that people would probably want to have their own MVVM library or their own MVU library the implementation by this library for both architecture models would have no use. In addition to that ViewBase for example is a class name that a lot of MVVM libraries use. That means that the users have to ust using aliases. My suggestion would be to move MVVM and MVU into a diffrent project. So that users can just install the markup implementation. I think there should be no drawback.

gritsenko commented 1 year ago

I know that library does not force you to use MVVM or MVU. But considering that people would probably want to have their own MVVM library or their own MVU library the implementation by this library for both architecture models would have no use. In addition to that ViewBase for example is a class name that a lot of MVVM libraries use. That means that the users have to ust using aliases. My suggestion would be to move MVVM and MVU into a diffrent project. So that users can just install the markup implementation. I think there should be no drawback.

Actually ViewBase is the equivalent of UserControl in avalonia/wpf, and it does not relates to MVVM pattern at all. The only mvvm library I found that uses ViewBase class was TinyMvvm, can you provide more examples?

Another thing is that ViewBase defines build UI method, incapsulates some binding logic and also used by markup extensions. Also it allows to use hot reload feature of net6+

So from my point of view all your complains are related to names of base classes, that might be misleading, am I right?

BaseCrusher commented 1 year ago

Yes, then i had to take a better look at the code.

Thanks for the clarification :)