I make life easier, that is to say I've been writing software for 9+ years. Eschew hype; focus on delivery and performance.
Living in Switzerland 🇨🇠since 2017.
I make life easier, that is to say I've been writing software for 9+ years. Eschew hype; focus on delivery and performance.
Living in Switzerland 🇨🇠since 2017.
Whenever your application needs to fetch data, allow the user to manipulate it, and then allow the user to sync it back to the system it fetched it from, there is a simple pattern you can apply to keep track of the state of the data.
In essence you'd have the following possible states:
Your app might not use the Draft state, in which case you only need states 1 and 3.
If there are errors writing back to the external system, the state field of the data doesn't change, but we write back an error to the database.
The front end, if it finds an error, it displays that error.
If there is success syncing back, the error in the database is set to null, to remove the error from the front end.