cancel
Showing results for 
Search instead for 
Did you mean: 

OfflineDataServiceAsync sync API

AlexGiguere
Contributor
0 Kudos

Hi, I am currently refactoring an app to used your new OfflineDataServiceAsync API

1 thing I notice, previously we had 2 set of API per function, a sync API and an async version with a completion handler

now everything is async, simple and fast things like loading a property or updating an entity have to be done async

service.loadProperty( ...

service.updateEntity( ..

is there a reason for this or am I missing something?

thanks

View Entire Topic
AlexGiguere
Contributor
0 Kudos

ok so it's a question of esthetic to have the same names,

if it is I think it could be nice to have to reconsider having a sync version

let me give you a good example

you have a master details app, the user clicks on a cell and you want to do some quick fetch before the detail view is presented or push

right now that means the table view reload or diffable data source will have to be called twice, we are talking about 1sec delay or less but you can see the animation is glitchy and there is a flickering because we were not able to load a property synchronously in the init of the viewModel

right now I am moving forward with the async approach, using another DataService wrapper does not seems state of the art coding and also not really documented

thanks