I'm writing a fairly simple app that requires some initial defaults to be established then allow the user to override those defaults.
I want to save the modified values across a restart.
Simple enough but I'm asking for advice on Best Practices.
Having read plenty of posts and doc etc there seems to be conflicting advice. Some say to minimize (not use it at all) the use of flow.set/get whilst others seem to be in favour. If you minimize or don't use it - how do you pass data between unwired nodes? Seems to be complicating the issue if you simply 'ban' the use of flow.set etc.
For saving user modified values, do you recommend manually maintaining the values and write them to a file whenever a change is detected... Or has the use of contextStorage pretty much become the normal practice of accomplishing this now? I see however that its use still has to be manually enabled via changes to settings.json and not via the dashboard (as far as I can tell) which makes me wonder if it is still in doubt as a viable solution?
I also read that it performs the updates every 30 seconds. Does that mean it writes out to the file system regardless even if nothing has changed?
My own thinking is to use flow.set into an array for user changes to default values and to manage the writing out of those changes myself to a file but only if values have actually changed during that period to cut down on unnecessary file i/o to an SD card.
I realise this is a dumb question but just looking for general advice before getting too deep and having to backtrack.