3 ms·
MVC-N
- messel 11y agoLooks like the beginnings of a sync adapter (android) except limited to a single app. I need to better understand the use of NSOperationQueue and why the speaker hates on singletons vs dependency injection. Singleton: allocs first time its needed, exists for the life of the app. Need to be mindful of how much data it stores, and thread safety Dependency Injection: allocs and passes to other view controllers as needed. Still need to be mindful of data it stores, and thread safety. The story at 27min or so is a keeper. Many Async->Async->Async calls all launching independently and updating the viewcontrollers without any control flow.
- roderic 11y agoI like dependency injection over Singleton for automated testing purposes. Singleton implies global state which is always hard to mock. Injecting a network manager that feeds you your test data has been a nice clean way for me.