Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你这个是MVP,不是MVVM #1

Open
MyateJx opened this issue Sep 9, 2017 · 0 comments
Open

你这个是MVP,不是MVVM #1

MyateJx opened this issue Sep 9, 2017 · 0 comments

Comments

@MyateJx
Copy link

MyateJx commented Sep 9, 2017

正因为有了databinding,原先需要在P层处理的UI逻辑,现随着数据的变化自动完成了更新。而你将binding传入ViewModel,等于是要ViewModel处理UI逻辑,这和Presenter有什么区别!正因为ViewModel专注于业务逻辑、不处理UI逻辑,才和Presenter区分开的,不然要databinding做什么呢?另外,数据应当全部放在ViewModel中,尽可能保证是View依赖ViewModel,而ViewModel几乎不依赖于View

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant