SwiftUI - Decoupling ModelsProblem: How can we avoid breaking an entire app when a model changes? Solution: Decouple each model based on their specific domain. A Deeper Dive When working with data from various sources, a common challenge developers face is the potential for e...Sep 13, 2023·9 min read
SwiftUI - Test drive the logic inside a view using TDDProblem: How test behavior inside a SwiftUI view ? Solution: Extract all the logic in a ViewModel and test drive only the behaviour using the TDD process ! You have this view to integrate Specs for this design look like this: - [ ] Display favor...May 30, 2022·16 min read
SwiftUI - Automate UI regressionProblem: How to automate regression on UI screens? Solution: Snapshot Tests ! SwiftUI and the Live Preview are a good matchThanks to them I was able to quickly build this view: The Live Preview is effective for creating viewsBut does not warn in cas...Apr 21, 2022·4 min read
SwiftUI - Integrate UI without a ready backendProblem: How to integrate UI with a not ready backend? Solution: By decoupling the model returned by the API from the model that manages the UI display ! Simple example with this interface inspired by the Message app: The row that displays a message ...Feb 16, 2022·6 min read