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

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!

Like what you read? Give Aamir J a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.