Most of us developers know can we can should abstract the network layer to support mocking, unit testing, and just to produce a more flexible design.
While lots of us know this, in practice it seems to get overly complicated and not always done well. A good design should simplify things, not complicate things. This is why I like this post focusing on using protocols to simplify network requests and improve testability. It even gets into decoding responses to give you a useful end-to-end flow.
Developing features for a large, established app, I often run get slowed down trying to throw together a new screen. You have to find the right spot in the code to update, build the whole app (not just what you changed), log in, and drill down to the right spot to try out your creation. Something’s off? Do it all over again.
Which is why I love the idea of the Playbook library, which is “a library that provides a sandbox for building UI components without having to worry about application-specific dependencies.” Yass! 🤟