How to rewrite the network layer so that you don't have to rewrite it

RU / Day 2 / 19:00 / Track 1  /

The story of how the network layer was rewritten in the Delivery Club iOS application. The story is completely banal and painfully familiar to everyone: old, dusty legacy, bugs with logout, code more complicated than Da Vinci's. The solution is elegant — a new network layer, an adapter for the old protocol, a facade for selection based on the Toggl feature, a gradual deployment through Firebase, monitoring of non-fatal errors. As a result, without a single change at the service level, all requests go to the network in a new way.

The fact that the author of the new network layer left the team even before it was deployed to users gives a highlight to this story. It would seem that the new network layer, not having time to prove itself, will immediately turn into legacy? But no, it turned out to be well designed and implemented. The cherry on top will be diagrams describing all the entities and their responsibilities.

Download presentation