MVVM: how to open a lookup window
Posted: Tue Dec 27, 2016 12:27 pm
Hi Nick,
after reading all posts in this thread multiple times and combining it with my needs, I'm now planning the following architecture for my applications (I need modular applications where the modules are coupled together at runtime via configuration files or a configuration database):
The program at startup should create the WorkspaceFactory, a singleton object. That should create then the ShellWindow (a window with only a top menu, a left menu pane and a tabcontrol for the remainder of the canvas).
Then, a module load class loads the needed assemblies, and calls an initialization method for every class in these assemblies that implements a specific interface (this code is already working). This initialization method registers the needed menu entries view/viewmodel couples and checks for the needed database structure, creating and/or modifiying the tables in the database.
I have already such an architecture that works, but without the WorkspaceFactory and withoud messenger. The corresponding view to a viewmodel is found through a datatemplate created at runtime, and the tabcontrol is bound to a collection of viewmodels.
I need such a structure because we do personalized applications and have to integrate the, also with standard modules. In the VO world, every application is a distinct exe file but we need to change that for the next generation of our applications.
Is this structure that can be valid in your opinion or have I to change something?
Thank you very much!
Wolfgang
after reading all posts in this thread multiple times and combining it with my needs, I'm now planning the following architecture for my applications (I need modular applications where the modules are coupled together at runtime via configuration files or a configuration database):
The program at startup should create the WorkspaceFactory, a singleton object. That should create then the ShellWindow (a window with only a top menu, a left menu pane and a tabcontrol for the remainder of the canvas).
Then, a module load class loads the needed assemblies, and calls an initialization method for every class in these assemblies that implements a specific interface (this code is already working). This initialization method registers the needed menu entries view/viewmodel couples and checks for the needed database structure, creating and/or modifiying the tables in the database.
I have already such an architecture that works, but without the WorkspaceFactory and withoud messenger. The corresponding view to a viewmodel is found through a datatemplate created at runtime, and the tabcontrol is bound to a collection of viewmodels.
I need such a structure because we do personalized applications and have to integrate the, also with standard modules. In the VO world, every application is a distinct exe file but we need to change that for the next generation of our applications.
Is this structure that can be valid in your opinion or have I to change something?
Thank you very much!
Wolfgang