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

Android应用架构选型(MVC MVVM MVP Flux Clean) #48

Open
vvLavida opened this issue Aug 18, 2016 · 6 comments
Open

Android应用架构选型(MVC MVVM MVP Flux Clean) #48

vvLavida opened this issue Aug 18, 2016 · 6 comments

Comments

@vvLavida
Copy link
Owner

vvLavida commented Aug 18, 2016

业务在不断推进,团队的多人协作效果并不是很好,业务内容庞大且繁杂,不同成员迥异的实现风格使得项目的维护成本越来越高,是时候做一次架构上的重构了。

大致的目标如下:

  • 易用性
    迁移的成本需要适当控制,不能给开发人员过重的额外代价,不然新架构根本推不动;可以考虑部分代码自动生成
  • 可测试性
    将UI代码与业务代码进行拆分,UI层和业务层可以分别进行单元测试 如何提高Android代码的可测试性? #47
  • 可维护性
    架构分层界限清晰,各个模块的实现职责都非常明确且单一
  • 可扩展性
    工程分离为平台部分和SDK部分,该部分独立实现独立维护,新增业务模块依赖SDK和基础平台进行独立开发,以独立模块的方式进行集成

目前流行的移动应用架构大致有如下几种:

@vvLavida
Copy link
Owner Author

vvLavida commented Aug 18, 2016

MVC

  • 视图(View):用户界面。
  • 控制器(Controller):业务逻辑
  • 模型(Model):数据保存

@vvLavida
Copy link
Owner Author

MVVM

@vvLavida
Copy link
Owner Author

vvLavida commented Aug 18, 2016

MVP
MVP是Google推荐的移动架构(Android-architecture

@vvLavida
Copy link
Owner Author

vvLavida commented Aug 18, 2016

Flux
Facebook Flux架构(for web)的Android实现

@vvLavida
Copy link
Owner Author

vvLavida commented Aug 18, 2016

Clean
The Clean Architecture

@vvLavida
Copy link
Owner Author

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

No branches or pull requests

1 participant