In my opinion, the main goal of MVVM is to exclude code that cannot be easily tested with unit tests . Since the view model can be checked by the module, but cannot be visible, this is achieved due to the fact that the view looks as deep as possible. Ideally, how this can be done using XAML, a view is fully declarative and only binds the data to a view model. Therefore, the "no code for" the mantra.
Reusing the view model in different user interface technologies is not really the goal of MVVM. If you try, you probably want to move the code specific to the user interface technology into the view again so that the view model is reused. This will be contrary to the main purpose of the audit.
If you really need to support different user interface technologies, then you can still divide the general logic of presentation models into a common "presentation" layer. I would not do this until Iβm sure that this is necessary.
Wim coenen
source share