i stumbled upon this neat approach to clean up your networking code using swift and some architectural patterns. it's like taking that messy junk drawer of url constructions ️, completion handlers , error handling , & making them reusable + testable ✨.
basically instead of scattering all this logic around in view controllers or models (which can make things tough to maintain and unit-test), you build a dedicated network layer. think about it as creating your own little api client that's easy on the eyes !
i've been playing with some clean architecture stuff recently, trying out for building these layers because of its type safety .
anyone else tried this in their projects? what did you find worked best?
article:
https://dzone.com/articles/robust-swift-network-layer-clean-architecture