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

OkMVP

 OkMVP

An internal talk I gave at work on MVP.

Aaron He

March 08, 2016
Tweet

More Decks by Aaron He

Other Decks in Technology

Transcript

  1. OK MAP WHAT’S THE PROBLEM? ▸ We want to deliver

    features fast ▸ At same time we need it reliable, scalable and maintainable ▸ We also need a pattern that is consistent
  2. OK MVP DECOUPLE BUSINESS LOGIC ▸ Activity/Fragment is difficult to

    test ▸ Yes, Espresso/UI Automater but with sloppy design Integration tests are a scam: https://vimeo.com/80533536
  3. OK MVP MODEL-VIEW-PRESENTER ▸ Start by defining interfaces. Pop Config

    as an example. ▸ Model ▸ View ▸ Presenter ▸ The interface is the contract ▸ Can be mocked
  4. OK MVP EASY TO INTEGRATE WITH LEGACY CODE ▸ Flexible

    ▸ Example: Confirm dialog when vehicle is deleted
  5. OK MVP WHAT COULD GO WRONG ▸ The View ▸

    Android fragmentation ▸ Interface is the contract ▸ But does the implementation actually do what you expect? Integration tests are a scam: https://vimeo.com/80533536
  6. OK MVP OK MVP ▸ An Ok architecture but simple,

    scalable, maintainable A few Ok libraries: https://www.youtube.com/watch?v=WvyScM_S88c