SwiftUI/Combine with MVVM-C, DDD, BDD/TDD and Swift Package Manager

Last updated: 24 days ago

For a big french insurance company, we had to refactor a 7 years old legacy objC app. We decided to use SwiftUI/Combine (we had the chance to be sure that all our 4000 end users were on iOS13). This is our journey:

  • from no arch to MVVM-C with shared domains
  • from 0% code coverage to 100% on Business layer
  • from no protocol to protocol oriented approach
  • from no Unit Test (NUT ?) to full BDD, TDD and DDD approach
  • from imperative programming to Combine and RFP
  • from a custom made UI generator based on XML to SwiftUI with mocks and UITesting
  • from no package (and everything public) to Swift Package Manager (and everything internal)

We will also cover some other topics that appeared when POCing the concept and pushing it to real development like why we decided to refactor (and not rebuild from scratch), why we decided to integrate RFP and Combine, which were the difficulties and the risks, how did we choose the architecture, how did we implement dependency injection, where are our protocols and why,...

At the time of the conference, it should be in production (because we are still in the middle of it) - or not because it completely failed (so far this is not what we are planning/experiencing but who knows... :-)).

We would like to share this experience with other developers, our pros and cons, our success and failures and why we are happy to work with those new paradigms IRL.