How to do the processing and keep GUI refreshed using databinding?

前端 未结 7 635
甜味超标
甜味超标 2020-12-09 04:51

History of the problem

This is continuation of my previous question

How to start a thread to keep GUI refreshed?

but since Jon shed new light on th

相关标签:
7条回答
  • 2020-12-09 05:46

    A layer between UI and the library is necessary. This will ensure that you will be able to do interaction testing and also allow you to swap out the library with another implementation in future without much change. This isn't a duplication, but a way of providing an interface for UI layer to communicate. This layer will accept objects from library, convert them to specific data transfer objects and pass them onto another layer which will have the responsibility to throttle the updates and convert them to your specific VM objects. My opinion is that VMs should be as dumb as possible and their only responsibility should be to provide data to views.

    0 讨论(0)
提交回复
热议问题