[Mvux][DesignPattern] How to apply the Repository Pattern in a Mvux uno application with DI? #2714
Open
13 of 18 tasks
Labels
kind/consumer-experience
Categorizes issue or PR as related to improving the experience of consumers
kind/documentation
Categorizes an issue or PR as relevant to 3rd party dependencies that are consumed by this project
triage/untriaged
Indicates an issue requires triaging or verification.
What would you like clarification on
Through the mvux is already seperating the VM tasks and data and in the existing Tutorials like for Feeds and States there are Services used to provide data operations, but thats actually making it harder to understand the actual seperation and architectural setup in case of a repository pattern would be wanted to be used.
I could imagine those two options of correct explanation to this but not be able to tell which is the correct one:
View-ReactiveVM-Model-Service-Repository-DataSource
Services are equal to Repository in Mvux (???)
Please add this explanation of usage for this DesignPattern differences to the docs and include sample code.
Thanks on advance!
Concern?
For which Platform
Anything else we need to know?
To me the Services in mvux samples are looking same to repository tasks and also there is not always clear which business logic should be set to the model and which to the actual service.
Some Background Information and usecase I am considering this to be applyable
My question is not directly limited to mvux, but related and also to DI and will include a library project for example to be able to reuse this Repository Pattern designed Services with DRY Code pattern best practice. Appart from the web references for Repository Pattern, my usecase is not http but connecting to an other Desktop app thats having a api just like you would have a Api in web, only without the http stuff ;)
Note
The Class, which is wanted to perform this CRUD Operation is currently named "Service", but from the Tasks a Repository seems to do, it might be actually a Repository. Just for this explaination, I will just call it "Service". Its definition is placed already in a Library Project, so this would be able to reuse for other applications
as is
for me (not public awailable)Planned Setup and Usecase:
1. Setup::
2. Actions
ReadParameters(Dictionary<string, decimal> iParameter)
for a specific Document in that other app.ReadParameters
:ArgumentNullException.ThrowIfNull();
IEnumerable<Parameter>
in this File/Document it has been connected to before, providing a INotifyPropertyChanged to the maybe listening to support a progressstate supporting controlSame Operation other way around for
WriteParameters
, so in my opinion thats a classical CRUD case isn't it?The Repository Pattern in general wants us to seperate the CRUD operations from the general business logic.
But although I did read and train my uno skills with the documentation to this, but I did not get:
The keypoint of this general question is, in mvux, there is already this/a seperation of interests coming from mvux and the business logic is placed at the model, while the Reactive vm is only told to take care of the view to model connection, ensuring the immutability.
The text was updated successfully, but these errors were encountered: