Thursday, August 21, 2014

MVP Pattern in Android

I am trying to read up on dependency injection on Android projects using Dagger right now, but I came across MVP (model view presenter) model. I suppose it is a prerequisite of dependency injection pattern...

At work, I've been using listener pattern because, aside from the fact that it is the first pattern I understood, my service --- which acts as a controller -- will just notify the concerning activities that implements certain callbacks; however, I do have some problems related to activity lifecycle when using this. Based from my initial skimming of sample Android project code that implements MVP, it seems that the latter is easier to implement, but I can't be sure yet as I have not tried it myself.

No comments:

Post a Comment