lundi 30 décembre 2019

Is it right to make View bind on Instance of View from ViewModel

I am working on new version of application that takes big word file and parse its section to GUI , the current version is written in .Net , WPF framework and MVVM design pattern .

The current architecture which the code is following is like this :

  • View has a datagrid and the datagrid binds on instance of Model in ViewModel

  • ViewModel has an instance of Model

  • Model has List of object of supporter class

  • Supporter class has properties which mapped to columns of datagrid in View

This structure is illustrated in UML for more clarification

The implementation:

View

ViewModel

Model

Supporter

I suppose to build on the current architecture ; I feel that the current architecture is anti-pattern and it have a tight coupling issue because it is binding on view directly but by using indirect way.

I would like to know If I am right or it is okey to go with this architecture.


Aucun commentaire:

Enregistrer un commentaire