I gave a talk on controlling complexity in Swift with value-oriented programming: realm.io/news/andy-matu.
(thanks !)
Conversation
…how were you triggering UI updates from model changes? KVO? NSFetchedResultsController? Core Data change notifications?
1
A DataStorage object vended signals by filtering the Core Data notifications.
1
1
1
Interesting. The case that seems hardest is when things would fall into/out of fetched sets. Were you solving for that?
1
DataChangeEvent<T> is the signal's value type.
1
so would, say, a table data source get ALL such signals, and check each against its fetch criteria?
2
No, it would make a query against the DataStorage object and receive a signal in reply.
1
Sorry, I’m feeling kind of dense, and the Twitter char limits aren’t helping; can I try gist.github.com/sixten/65f1888 ?
1
Replying to
1. The signals capture their queries.
2. Sorta: it listens to the NSMOC change notification and filters.
3. No: it uses the signal.

