~/talk

A Protocol for Composition

Talkat iOS Conf SG 2016 · on Sunday, 2016-10-23· [ios, software-architecture]
slides:none on file

Lyft refactors large view controllers into many small reusable pieces using Swift protocol extensions, giving default implementations (so a view controller can opt in without inheritance). A concrete example is a ride requester protocol with a default request implementation, and a map state displayable pattern that keeps one Google map instance (maps take ~0.5s to load on a 5S) while swapping lightweight child controllers. The team reaches ~120 protocols, shrinks controllers, and improves reuse and testability.

AI-written summary · about

  1. 0:00Introduction
  2. 0:45Overview
  3. 1:23Protocols
  4. 2:09Polymorphic Code
  5. 3:03User
  6. 4:15Passenger Representation
  7. 5:03Swift Protocol Extensions
  8. 6:02Mockup
  9. 8:43The Class Graph
  10. 9:54Refactoring
  11. 10:21Sharing
  12. 12:27Write Requester
  13. 13:06Request a Lift
  14. 13:32ViewController subclass
  15. 14:08Protocol Extensions
  16. 16:51Complex UI
  17. 17:01Reusable Pieces
  18. 17:27Modals
  19. 18:03Venues
  20. 20:07View Hierarchy
  21. 20:49MapStateDisplayable
  22. 21:52Custom Animations
  23. 22:14MapState Presenter
  24. 22:45UIViewController
  25. 23:33ViewController
  26. 24:18Map Observer
  27. 25:03Map Updates
  28. 26:02Feature Highlighter
  29. 27:29Conclusion
  30. 28:03QA
~/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.