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

"MVVM+Router with Swift" by Oleksandr Stepanov

"MVVM+Router with Swift" by Oleksandr Stepanov

In his talk Oleksandr will go through popular iOS development architecture patterns nowadays, review there advantages and disadvantages, and will concentrate on, in his opinion, the most efficient one, MVVM+Router(Coordinator). The topic will have samples on Swift programming language, and demo project in the end.
Demo project:

This talk was made for CocoaHeads Kyiv #12 which took place July 22 2017.


CocoaHeads Ukraine

July 22, 2017

More Decks by CocoaHeads Ukraine

Other Decks in Programming


  1. Oleksandr Stepanov iOS developer, Team Lead MVVM + Router with

  2. Agenda Other Architectures MVVM+Router (Coordinator) Demo Q&A

  3. MVC

  4. MVC (Apple edition)

  5. + Simple + Speed of development + Comes out of

    the box - View and Controller are tightly coupled - Massive View Controller - Bad testability MVC
  6. MVP

  7. + Responsibilities distributed better + Improved testability - ViewController and

    Presenter have a reference of each other - Tests side effects from routing MVP
  8. Bindings! MVVM

  9. + Responsibilities distributed + Improved testability + Reactive approach -

    Reactive programming may complicate debugging - Routing question is not addressed. MVVM
  10. VIPER

  11. + Best responsibilities distributed + Best testability - Too much

    classes VIPER
  12. MVVM+Router

  13. Demo Link on Github

  14. + Good level of responsibilities distribution + Good level of

    testability + Less classes & protocols then in VIPER … - … but still a lot of. MVVM+Router
  15. • Use the same architecture across the project • Define

    base classes/protocols for the architecture of your choice • Use dependency through protocol whenever it’s possible • Use mocks in tests Summary
  16. Make everything as simple as possible, but not simpler Albert

  17. Thank you!

  18. Q&A ↑ slides ↑