Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MVP Pattern

MVP Pattern

This talk presents a Fundamental of MVP Pattern in Android Devlopement by Moinkhan Pathan

Technophile Community Surat

January 21, 2018
Tweet

More Decks by Technophile Community Surat

Other Decks in Programming

Transcript

  1. Why not MVC - Everything connected to Everything. - Controller

    becomes heavy by time - Not Modular - Not Scalable - Not Testable
  2. Separation of Concern  Model & View never communicate with

    each other.  View layer is completely dumb.  Each layer performs a specific task.
  3. Modularity  Packages are not made of components but for

    screens.  Every screen is in it’s own package containing Activity/Fragment (View), Presenter, Contract.  Easier to modify or add new feature.
  4. Scalability  Model layer is given in data repository format.

     Model layer is available as Plug & Play.  Modification of layer will not impact another layer.
  5. Testable  80% of code resides in Presenter & Model

    layer.  Easier to write test as everything is broken to modules.  Model & Presenter are pure Java, they can be tested easily using only JUnit.