Current location - Health Preservation Learning Network - Slimming men and women - What are the advantages and disadvantages of Android MVP development model?
What are the advantages and disadvantages of Android MVP development model?
Advantages: view is undertaken by Activity, Presenter does business, and the structure is clear (the mode is to pay attention to a routine, and clear structure is also beneficial to the maintenance of latecomers). In the past, development meant writing a class. During the activity, I have a headache when my business is complicated.

Disadvantages: Each view has a presenter, and there are many classes. Not to mention presenter reuse, I can't abstract presenter reuse (technical scum) in practical work. Sometimes the business is so simple that it can be done directly with one activity.

Structure diagram:

It is not easy to learn to understand the cost.

In addition, presenters only deal with one view, and an activity may have multiple presenters.

Leave all activities to the presenter. Produce more classes.

In fact, thoughts are always changing. The key is to understand them and make changes to your own projects, which may not be suitable for any team to develop.