I am at the stage of completing a large project with several major components: image collection, image processing, data storage, factory I / O (automation project) and several others.
Each of these components is quite independent, but for the implementation of the project as a whole I need at least one instance of each component. Each component also has a ViewModel and View (WPF) for status monitoring and parameter changes.
My question is the safest, most efficient and most supported way to instantiate all of these objects, subscribe one class to an Event in another and have a common ViewModel and View for all this.
Would it be better if I had a class called God that has a private instance of all these objects? I have done this in the past and regretted it.
Or it would be better if God relied on Singleton's instances of these objects to make the ball roll.
Alternatively, if Program.cs (or wherever Main (...)) is, create all these components and pass them as parameters, and then let Him (snicker) and his ViewModel deal with the peculiarities of starting this project .
Any other suggestions I would like to hear.
Thanks!
c # wpf mvvm god-object
bufferz
source share