Skip to content
Volodymyr edited this page Sep 22, 2019 · 30 revisions

Moxy is Android MVP helper library

schemmatic_using

What's happened here:

  1. At View happened action orange_triangle, that is passed to Presenter
  2. Presenter sends command orange_circle to ViewState
  3. ViewState adds a command orange_circle to commands queue, and then passes it to View
  4. View brings itself into a state specified in the command orange_circle
  5. Presenter starts async request green square to Model
  6. Presenter receives result of request green square from Model
  7. Presenter sends command red_circle to ViewState
  8. ViewState adds a command red_circle to commands queue, remove existing command orange_circle and then passes it to View
  9. View brings itself into a state specified in the command red_circle
  10. Presenter sends command green_circle to ViewState
  11. ViewState adds a command green_circle to commands queue and then passes it to View
  12. View brings itself into a state specified in the command green_circle
  13. New/recreated View attach to existing Presenter
  14. ViewState sends queue of saved commands to new/recreate View
  15. New/recreated View brings itself into a state specified in the commands red_circle and green_circle