MVVM: Thin ViewModels and Rich Models

前端 未结 4 1258
小鲜肉
小鲜肉 2021-01-02 02:35

I\'m continuing to struggle with the MVVM pattern and, in attempting to create a practical design for a small/medium project, have run into a number of challenges. One of t

4条回答
  •  伪装坚强ぢ
    2021-01-02 03:24

    Disclaimer - I am not an expert -

    I do not put INotifyChanged on my Models. I had done this at first but came to the simple realization that INotifyChanged is really only practical for notifying the UI so I only put INotifyChanged on my ViewModels now. This has made it easier to control the number of "RaisePropertyChanged"... My views never reference a Model directly.

    I'm working on my first MVVM project yet on my 3rd major refactor :P

提交回复
热议问题