Data Sources in Swift… or how to avoid that this new trendy persistence framework determines the…
David Cordero
699

Great article! I was implementing something related and this article really helped me figure out the correct approach.

I was wondering, if let’s say we have a NetworkDataSource, and a CoreDataDataSource (for argument’s sake), would both data source adhere to the same DataSourceProtocol, or is it okay to abstract NetworkDataSource and CoreDataDataSource to adhere to NetworkDataSourceProtocol, and PersistenceDataSourceProtocol respectively(the difference may be that you might want to insert let’s say 10 objects at once in the PersistenceDataSource before committing). Please don’t hesitate to correct my understanding!

Thank you!

Show your support

Clapping shows how much you appreciated Aamir J’s story.