DEV Community

Discussion on: Realm Database Guide - Building a Note app in Swift for iOS

Collapse
lianahaque profile image
Liana Haque

What's the difference between the DataSource and NoteDataSource? I've seen other projects use a DataSource or a RealmManager in order to create generic functions but I was curious as to why there were separate protocols for the DataSource.

Collapse
jordanosterberg profile image
Jordan Osterberg Author

DataSource is the generic protocol for storing data, and NoteDataSource is the implementation for the Note data type.

Collapse
lianahaque profile image
Liana Haque

Thanks, Jordan!