dotNetify icon indicating copy to clipboard operation
dotNetify copied to clipboard

Offline First

Open joshua1 opened this issue 6 years ago • 3 comments

Hi @dsuryd i want to say once again that this is an amazing library and i have been using it on a small project. I wish to know , what the design would be like to make dotnetify offline-first (handle state changes offline and sync when connected) as well as the real-time it already is

joshua1 avatar Mar 07 '18 10:03 joshua1

The strategy is basically to have vm state preloaded and cached so it can serve as a fallback when connection fails; when the connection can be established, the cache is updated with fresh state.

dsuryd avatar Mar 08 '18 01:03 dsuryd

@dsuryd thanks for the reply. that seems like one way update (server to client). if the state has been modified by the client , does the server get any update too ?

joshua1 avatar Mar 08 '18 08:03 joshua1

It could, but there may be many cases where you want to control when and how, so this shouldn't be done automatically. What dotNetify could do is to provide state transition hooks with default behavior of doing nothing, but could be freely configured.

dsuryd avatar Mar 08 '18 16:03 dsuryd