Skip to content

Conversation

mookkiah
Copy link
Contributor

@mookkiah mookkiah commented Aug 5, 2017

Marking FileLoader (Model) as Serializable, because model is an interface to provide data and it can provide caching behaviour. Presenter should be able to restore the model in any event.
Marking FileSelectorView as Serializable as I think view is made up of some static structure and Serializable data (from model).
Presenter is an middle-man who manages View and Model. Both View and Model will be given to Presenter by the application. It will not make any harm to make presenter as Serializable. It will be useful serialize model and view as it is tied to one another.

Or, we could set //NOSONAR and let the consumer application framework to decide whether to mark as Serializable or not based on their design.

References:
https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter
https://medium.com/@cervonefrancesco/model-view-presenter-android-guidelines-94970b430ddf

@iluwatar
Copy link
Owner

@mookkiah I'm not sure which SonarQube issue this PR fixes?

@mookkiah
Copy link
Contributor Author

@iluwatar, This is for issue #587

@iluwatar iluwatar merged commit 2e99cb4 into iluwatar:master Aug 13, 2017
@iluwatar
Copy link
Owner

Thanks @mookkiah the fix has been merged 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants