How to build the ViewModel in MVVM not to violate the Single Responsibility Principle?

后端 未结 4 1024
花落未央
花落未央 2021-01-17 12:15

Robert Martin says: \"There should never be more than one reason for a class to change\".

Let\'s consider the ViewModel class which is bound to a View. It is

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-17 12:45

    Yes, but that doesn't mean poor design couldn't force you into it.

提交回复
热议问题