The analytics library we are building is tightly coupled to the GoogleAnalyticsClient
class. Tight coupling negatively impacts testability and it is often an indication that there is room for improvement. In this episode, we decouple the analytics library from the GoogleAnalyticsClient
class by taking a protocol-oriented approach. Let me show you how that works.
Subscribe to Cocoacasts Plus to watch this episode.
Building Type-Safe APIs in Swift
Decoupling the Analytics Library
by Bart Jacobs in Programming
Swift 5
Xcode 14
iOS 16
Building Type-Safe APIs in Swift
-
1 Eliminating Stringly Typed Code
06:31
-
08:21
-
06:22
-
05:30
-
5 Decoupling the Analytics Library
09:50
-
7 Looking Beyond Code Coverage
09:39
-
08:23