First of all, I always think thatMVPwill become dirty if the business is complicated. For example: Your business needs to do something before initiating a request, something needs to be done after the request responds, and finally something needs to be done for error handling. Then a business needs to write 4 interfaces.MVP业务复杂的话会变得很脏。 比如: 你一个业务发起请求前需要做一些事,请求响应后需要做一些事,最后错误处理还要做一些事,那么一个业务需要写4个接口。
其次,Presenter
Secondly,
Presenteris business-related, not page-related.
Finally, it is a design pattern idea. There is no need to be strict about the package structure, just do whatever you like.
First of all, I always think that
MVP
will become dirty if the business is complicated.For example: Your business needs to do something before initiating a request, something needs to be done after the request responds, and finally something needs to be done for error handling. Then a business needs to write 4 interfaces.
MVP
业务复杂的话会变得很脏。比如: 你一个业务发起请求前需要做一些事,请求响应后需要做一些事,最后错误处理还要做一些事,那么一个业务需要写4个接口。
其次,
Secondly,Presenter
Presenter
is business-related, not page-related. Finally, it is a design pattern idea. There is no need to be strict about the package structure, just do whatever you like.Personal understanding:
1. Divide by business module
2. Within the business module, divide MVP
3. Of course, you need base, common, etc. dependencies