~/talk

Roll your own networking stack

Talkat Do iOS 2022 · 2022-11-08..11-09· [ios]
slides:none on file

Refactors a massive view controller into a tiny composable networking layer built in Swift using URLSession. Claims simple cases stay easy while hard cases remain possible by using a Requestable protocol to hold path and headers, a Resource<T> generic that carries a decode closure, and an APIClient with Environment that supplies baseURL and common headers. Shows a JSONDecoder keypath helper, default protocol implementations, and says the whole stack fits in ~100–150 lines and makes networking testable and concise.

AI-written summary · about

  1. 0:00Introduction
  2. 1:23Code refactoring goal
  3. 2:51Massive view controller
  4. 5:45Modeling requests
  5. 7:58Requestable protocol
  6. 11:56Handling responses
  7. 15:43Generic resources
  8. 19:28Network environments
  9. 23:02API client abstraction
  10. 25:06Summary and takeaways
  11. 27:47Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.