adospace / reactorui-maui

MauiReactor is a MVU UI framework built on top of .NET MAUI
MIT License
555 stars 46 forks source link

hardness on using controls #158

Closed juanyacovino77 closed 3 months ago

juanyacovino77 commented 9 months ago

This framework is great, I am using it for a production app but

I think one the most stressing problem with MauiReactor is that you have to be guessing how actually controls works all the time.

Even though it is said that MaiuReactor controls wraps and works just like .NET MAUI controls they actually dont have the same API nor functionality of .NET MAUI controls... so you have to be looking through example or ask... that is happening because there is no documentation on how to use each MauiReactor control... you have to be guessing on how to port functionality from .NET MAUI to MauiReactor... is it a prop? is it have to be use inside brackets? is it a parameter?

how can we solve this?

adospace commented 9 months ago

I guess, you already looked at the documentation web site? https://adospace.gitbook.io/mauireactor/

Basically, for all controls: 1) dependency properties that deal with simple types (i.e. excluding templates, or views) are translated to Prop methods. for example, Button Text dependency property is mapped to Text fluent method:

new Button()
    .Text("Click!")

2) Events are translated to methods that accept a callback.

new Button()
      .OnClicked(()=> ...)

Properties and events are generated automatically by a source generator so it's guaranteed that all of them are present in the wrapper.

A different thing is when you have to deal with controls that require a template or a view: I agree with you that I should write more articles about this and apologize for that; It has been years now that I write applications using ReactorUI for XamarinForms/MAUI that it's pretty easy for me to implement them but I recognize that could be a time-consuming process.

Are you referring to a particular control/behavior?

adospace commented 9 months ago

and what do you mean by "they actually don't have the same API nor functionality of .NET MAUI controls"?

juanyacovino77 commented 9 months ago

I guess, you already looked at the documentation web site? https://adospace.gitbook.io/mauireactor/

Basically, for all controls:

  1. dependency properties that deal with simple types (i.e. excluding templates, or views) are translated to Prop methods. for example, Button Text dependency property is mapped to Text fluent method:
new Button()
    .Text("Click!")
  1. Events are translated to methods that accept a callback.
new Button()
      .OnClicked(()=> ...)

Properties and events are generated automatically by a source generator so it's guaranteed that all of them are present in the wrapper.

A different thing is when you have to deal with controls that require a template or a view: I agree with you that I should write more articles about this and apologize for that; It has been years now that I write applications using ReactorUI for XamarinForms/MAUI that it's pretty easy for me to implement them but I recognize that could be a time-consuming process.

Are you referring to a particular control/behavior?

Ado, please you don' t need to apologize for nothing, your work is just excellent,

The problem lies in the ambiguity on where to read about how to use a control... Let's say I want to implement a FlyoutPage, well... that control usage is different from .NET MAUI to Reactor.. let's say I want to implement a RadioButton group and pass it a Template... well I will have to ask here.. the confusion is about: Do I have to read .NET MAUI official doc or ReactorMaui?

Maybe a systematically and simple way of accesing complex control or documention about it will solve this problem!

(by the way, that explanation on how props and events are port to Reactor would help new users if it is posted on the doc)

adospace commented 9 months ago

The best I can do is follow closely the .NET MAUI official documentation and, at least for each control, create a documentation page that explains precisely how to replicate the same features in MauiReactor.

I've decided to start with the FlyoutPage, RadioButton, and CollectionView. Please take a look at the updated site: https://adospace.gitbook.io/mauireactor/components/controls

I'll keep this ticket open until the documentation section is not completed

juanyacovino77 commented 9 months ago

Ado, that is awesome. I'm sure that it will make Reactor more accessible for new users. I will try to help when possible!

juanyacovino77 commented 8 months ago

Hey @adospace how can we play a simple mp3 wav - ringtone sound on certain actions at MauiReactor apps?

I have succesfully scaffolded the MediaElement of .NET MAUI and it is barely working but I think I need something simpler than a hole media player