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

2019-11-06:什么是MVVM?你是如何将其应用于具体项目中的? #182

Open
Moosphan opened this issue Nov 6, 2019 · 2 comments

Comments

@Moosphan
Copy link
Owner

Moosphan commented Nov 6, 2019

No description provided.

@FeanCheng
Copy link

个人理解(欢迎指正 感谢!)
MVVM = Model View ViewModel
主要分离View 和Model的 让View层不做逻辑 model层不做界面刷新
View:只负责接收新的数据 和刷新界面 通知ViewModel去计算/获取数据
ViewModel : 负责接收View的获取数据请求 计算获取新的数据
Model:模型类
配合databinding 更配噢!

@lix-b
Copy link

lix-b commented Apr 5, 2021

首先MVVM是一种架构思想。他的主要思想是视图层和model层更加解耦。双向绑定机制使得MVVM更受欢迎,model层改变直接回体现到View层,View层的变动也会体现到Model层。Android目前的双向绑定是由databinding实现的

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

3 participants