Moved MainActivity to MVP
closes #17 (closed)
Merge request reports
Activity
added 1 commit
- 3ae09964 - Changed MainActivityMVP to MainActivityMVP contract
Okay, thanks for working on this! Just writing here for my own notes to make sure I understand the design:
You've separated the main activity into two parts: the presenter (that takes care of responding to user inputs and getting the information to the user), and the model (which acts as an interface between the presenter and storage).
Almost right, but little changes...
View(UI where user interacts) <=> Presenter <=> model(Fetches data and makes network calls)
The presenter mediates between the model and view. For instance, If the user clicks on the "refresh page", the View will tell the presenter and presenter will tell Model to fetch new content after model fetches the content asynchronously it calls a method on presenter and presenter will, in turn, say to the UI to update giving it the latest data.
Let me know if it wasn't clear, I know I can be bad at explaining things so don't hesitate.
mentioned in merge request !13 (merged)