Our Journey to Reactive Programming
About Us
● Formerly Magisto
● Cross platform video creation tool aimed at SMBs and consumers
● Acquired and became part of in 2019
● Now a part of an organization with multiple mobile development teams across different countries
About Us
The Israel iOS Team is responsible for Vimeo’s video creation and editing framework and also
maintains the Magisto app
Wizard Editor
Core API
Tools
The evolution
We ended up with this:
Text resize example
FullscreenViewModel
Text resize example
FullscreenViewModel
SelectedTextStickerScaleConfiguration
TextStickerViewModel
InspectorViewModel
Observable pattern
Not quite
● iOS 12 compatible (no Combine, kids)
● RxSwift?
● OpenCombine?
Observable Property
Text resize example
FullscreenViewModel
SelectedTextStickerScaleConfiguration
TextStickerViewModel
InspectorViewModel
Text resize example
TextStickerViewModel
InspectorViewModel
Our’s Combine’s
PassthroughSubject
Our’s Combine’s
CurrentValueSubject
ObservableArray
The cons
● Xcode is not built for that
● Need to adopt new code style, especially while passing references
● Be aware of who can send and who can receive events
The cons
The cons
● Xcode is not built for that
● Need to adopt new code style, especially while passing references
● Be aware of who can send and who can receive events
● Pay attention to memory cycles and double subscriptions
The cons
Weak self Inner functions
The cons
Using wrong dispose storage
The cons
● Xcode is not built for that
● Need to adopt new code style, especially while passing references
● Be aware of who can send and who can receive events
● Pay attention to memory cycles
● You cannot control the observing queue
● Overusing observables
Where we go from here
● Use Combine once we drop iOS 12 support.
● Extend Combine available subjects to meet our needs
● Adopt other Reactive features as we go
Thank you!

Vimeo - TLV iOS developers meetup slides 26.10.21

Editor's Notes

  • #5 Explain what we had, and what we were required to do. We had a simple Collection View in which you can reorder the cells and make some simple actions. Now we have Two Main views with lots of actions that each of them trigger an event in some or many views. We call those action makers Inspectors
  • #6 Our first design: Delegates from inspectors to the view. The problem: delegates would require a controller to receive updates from inspectors and update all other inspectors and main views. It would require a delegate protocol for each action and an array of listeners (we have a chart showing that mess).
  • #10 Need to conform to iOS 12 (so no combine framework could be used) RX could be a solution, but we got afraid of: 1) Knowledge curve + 2 ) In the future we would have code working with RX and new one with Combine 3) If an object is written in RX, we wouldn’t maintain it with Combine and Vice-Versa, causing developers to keep up to dated in both technologies. OpenCombine could be a solution but then we would need to rely on a 3rd party that we were not sure about and it is on pre-release stage to this day.
  • #17 Be aware of who can send and who can receive events -> SafePasstruSubject
  • #18 Be aware of who can send and who can receive events -> SafePasstruSubject
  • #19 Be aware of who can send and who can receive events -> SafePasstruSubject
  • #20 Be aware of who can send and who can receive events -> SafePasstruSubject
  • #21 Be aware of who can send and who can receive events -> SafePasstruSubject
  • #22 Be aware of who can send and who can receive events -> SafePasstruSubject
  • #24 Leave a couple of minutes for Q&A / open discussion