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

Splitting Monolithic Swift Code Base Into Modules

Splitting Monolithic Swift Code Base Into Modules

Modular Architecture - insights from a big French e-commerce. How to challenge the status quo, boost team motivation, productivity and start writing cleaner code with more tests? A journey of sailing from monolithic codebase to modules.

- how do we switch to a MVVM+C architecture within existing Swift code base?
- how do we approach splitting the monolith into modules?
- how do we boost features development with product modules?
- how do we get rid of Core Data?
- is TDD possible in a slowly compiling Swift code base?
- what are some unobvious benefits of code modularization?

Maciek Grzybowski

October 20, 2018
Tweet

Other Decks in Programming

Transcript

  1. Company organization Product Team Product Team Product Team ... ...

    Lead Dev UX PO QA iOS, Android, Web, backend DEVS
  2. The iOS chapter - 10 iOS Engineers - 7 in

    Product Teams - 3 in Core Team Product Team Product Team Product Team Product Team ... ... CORE Team
  3. Our code base was not in a good shape -

    hard to understand - long to compile - slow test feedback - little test coverage - difficult to refactor - little reusability
  4. Pain points - exploding complexity - fat, static objects -

    massive view controllers - low test coverage complex code devs go quick & dirty
  5. Pain points - mess photo by Rick Mason - @egnaro

    at unsplash.com mess devs duplicate, not reuse
  6. Pain points - waiting time photo by Pixpoetry - @blackpoetry

    at unsplash.com frustration no change
  7. VM + VC Coordinator VM + VC VM + VC

    API Responses Business Models
  8. VM + VC Coordinator VM + VC VM + VC

    API Responses Business Models marketplaceCoordinator.start()
  9. VM + VC Coordinator VM + VC VM + VC

    API Responses Business Models marketplaceCoordinator.start()
  10. VM + VC VM + VC VM + VC UserEngagementCoordinator

    UE API Responses UE Business Models create create create
  11. ?

  12. - quick iteration on single screens - quick iteration on

    entire flow - efficient for legacy code - efficient for new features Coordinator UserEngagementCoordinator
  13. New shape of our code base - easier to understand

    - faster to compile - has better test coverage - gives quicker test feedback - invites for reusability - simpler to refactor - faster features development - happier developers!
  14. It was a long term investment for us code base

    size feature development effort with modules with monolith
  15. Paul-Emmanuel Garcia iOS Developer, Product team @pemgarcia Maciej Grzybowski iOS

    Lead Developer, Core team @ncreated We are hiring! https://l.vpgrp.io/vptechcareers https://careers.vente-privee.com/en/vptech/