Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Is Activity God? ~ The MVP Architecture ~

15,450 views

Published on

About MVP Architecture, The Difference between MVC and MVP, and Pros/Cons of MVP

Published in: Software

Is Activity God? ~ The MVP Architecture ~

  1. 1. Is Activity God? Kenju Wagatsuma
  2. 2. Agenda: -> ❖ 1m : Story Behind ❖ 3m : What and Why? ❖ 1m : Conclusion
  3. 3. /** * Introduce Myself * * @author me */
  4. 4. “me” = { “name” : “Kenju Wagatsuma ( KJ )”, “company” : “Recruit Technologies Co.,LTD.”, “profession” : “Android Development”, “favs” : { 'Music' : ‘Stevie Wonder', 'Hobby' : ‘Acoustic Guitar & Singing’, 'Sport' : 'Rugby' } }
  5. 5. /** * Story Behind * * @author me */
  6. 6. To Do MVP -> MVC? -> What? -> Why? Not To Do MVVM DDD Sample Code
  7. 7. Activity -> UI + Logic :( -> Multiple Threads :( -> Spaghetti :( -> Testing is hard :( Other Classes
  8. 8. MVP? ナニソレオイシイノ?
  9. 9. /** * What MVP? * * @author me */
  10. 10. http://www.techyourchance.com/model-view-controller-mvc-and-model-view-presenter-mvp-architectural-patterns-in-android-part-1/ No Communication
  11. 11. Entity / Data ( e.g. JSON, SQL ) UseCase / Business Logic Presenter / Adapter View / UI Threads
  12. 12. Entity / Data ( e.g. JSON, SQL ) UseCase / Business Logic Presenter / Adapter View / UI Threads X X X
  13. 13. /** * Why MVP? * * @author me */
  14. 14. Why? - Pros, Cons ❖ Maintainability ❖ Testability ❖ Information Hiding
  15. 15. Why? - Pros, Cons ❖ Redundancy ❖ Takes Time
  16. 16. /** * Conclusion * * @author me */
  17. 17. No Silver Bullet ❖ MVP ❖ is just one of possibilities and not a perfect solution ❖ could be mixed w/ other solutions
  18. 18. /** * Appendix * */
  19. 19. Blog “Architecting Android… The clean way?” @see http://fernandocejas.com/2014/09/03/ architecting-android-the-clean-way/
  20. 20. Blog “M — Model in MVC, MVP, MVVC in Android” @see https://medium.com/@artem_zin/m- model-from-mvc-mvp-in-android-flow- and-mortar-bd1e50c45395#.5e525edu1
  21. 21. Github Wiki “Introduction to Model View Presenter on Android” @see https://github.com/konmik/ konmik.github.io/wiki/Introduction- to-Model-View-Presenter-on-Android
  22. 22. Blog “Androidでは MVCよりMVPの方がいいかもしれない” @see http://konifar.hatenablog.com/entry/ 2015/04/17/010606
  23. 23. Blog “これからの「設計」の話をしよう” @see http://tech.recruit-mp.co.jp/mobile/ android-architecture/
  24. 24. /** * Happy Coding! * */
  25. 25. /** * Contacts * */
  26. 26. “contact” = { “Twitter” : “@kenjuwagatsuma”, “GitHub” : “https://github.com/KENJU”, “Blog” : “https://medium.com/@kenjuwagatsuma” }

×