I want to make a simulation software that for the time being, is meant to simulate many small simulations.
I can smell it getting complicated, so I’m trying to use proper planning to make sure things don’t get complicated.
I have used MVVM for simpler projects with no prolems so far. I even somewhat understand how to use MVVM. But my understanding of “the model” is still a bit murky.
There are many “typeX Settings” views to change multiple settings.
A change in settings would inform the simulator that a new simulation could be run.
I also want to have the simulation in a separate “project” in the solution, to enure it’s heavily decoupled from whatever the UI does/is. (and other reasons)
So how exactly should a program like this be set up?
This is the best solution I came up with so far:
(The wording in the arrows might be confusing, so don’t focus on them too much…)
Here, I have put the models into the project with the simulator, because the simulation is dependent on the information contained in the model. Is it reasonable to separate an MVVM into separate projects such that the UI only contains views and viewmodels, and has no models?
I didn’t want to have the models of the “typex” to be able to notify the simulator of new values because I want them to be pure containers of data. This seems to increase coupling though.
Any thoughts or comments on setting up this kind of a project? I don’t want to refactor something this big later on in the project because of poor decisions while setting up the project.
I’m also planning to use WinUI3 for this.
Is MVVM even the most fitting solution?
Thanks for any comments, thoughts, and recommendations!