I just need a simple explanation:
I have an example application with a ball model and two views (say, one shows the ball and allows you to resize it, if you use the mouse to change the color with a click, the second one has a control with two child controls (text box size and color selection) )
Does MVVM say that I have two virtual machines here, one for each particular view, or am I allowed to reuse the virtual machine without breaking the template?
As a follow-up question, if I need to have two virtual machines, is it legal, according to the pattern, to have one as a derived type of the other, or both as derived types of a base class or based on compound classes on common parts? Basically, you need to do two types, but improve reuse?
My example is contrived; I tried to emphasize that both representations affect the same two properties of the model. Maximum size, colors available, etc. The same between both representations.
thanks
source share