MVP模式的全称为Model View Presenter模式,源于MVC(Model View Controller)模式,Model(Repository)负责提供数据,View负责展示数据,接收用户操作并反馈到Presenter,Presenter负责处理数据供View使用,处理用户操作。
MVP模式的优点包括方便自动化测试,提升关注点分离(improve the [separation of concerns](https://en.wikipedia.org/wiki/Separation_of_concerns) in presentation logic)。
A simple demo of mvp:MvpDemo