Replies: 3 comments 2 replies
-
There's also a question about how we make sure serialisation and deserialisation is correct. There's some obvious tests along the lines of serialising then deserialising and checking the state. A common problem with serialisation is that it often requires the programmer to remember to include and test every new field. |
Beta Was this translation helpful? Give feedback.
-
Another question is how we make it robust to future changes. What if we add or remove a field between versions. Perhaps we could have some kind of decorator system that makes this easier to follow and check. Specify in the decorator what fields there should be, have "removed" fields which can be given code on a that will handle removed fields on a case by case basis. Or we have a decorator which allows you to specify what happens with different versions. Or something else. |
Beta Was this translation helpful? Give feedback.
-
Surely we need any changes to (fitting and other perspectives) parameters to be remembered.
We currently have a pretty decent (?) Project Save serialization. Undo/Redo can reuse this section to save certain aspects of the total state on a stack.
Probably not. We can offer a separate conversion tool for older projects/state saves.
The current consensus seems to be JSON, but we might want to look at other formats. Qt internal serializer can be used with either JSON or XML (QDataStream)
As mentioned, it would probably make sense to combine these two for the sake of maintainability.
I strongly advise against that. The complexity seems significant and the applicability dubious (unless explicitly requested by users, I guess?)
If we decide on using the Qt serializer, then obviously qtgui. |
Beta Was this translation helpful? Give feedback.
-
During our plotting refactor meeting, we started to discuss Serialization and an Undo Stack. The question was raised of how extensive would this need to be. This would track what was done, not only to the data, but also GUI interactions. Also, should existing project files continue to be supported?
Questions asked during the meeting:
Beta Was this translation helpful? Give feedback.
All reactions