After some time developing personal Android Applications I found that usually Activities get really big and have both logic and UI operations quite mixed up.
So looking for a way to separate logic from UI I came across MVP pattern and now I'm trying to implement it in the application I'm going to develop.
So basically this would be my approach:
I will have a presenter for each view in the application and then every presenter will call the interface model manager to get the data from different classes.
Some of the model classes need a context, for example FilePicker needs ctx to get a file OnActivityResult. For this I would pass Context from View to Presenter and the to ModelManager.
Do you think it's a good approach or it is not MVP at all?
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire