What are the different considerations to make when determining persistent data format? [duplicate]

softwareengineering.stackexchange https://softwareengineering.stackexchange.com/questions/95719

  •  02-11-2019
  •  | 
  •  

質問

I've recently been struggling with the concept of what file structure to use when creating save-files for a desktop applications. When I say "save-files" I mean something like *.doc files. Files that contain the work that the user put into the program and want to be able to load and resume their work at a later time.

Things like binary serialization are easy, though if and when the model for the applications gets re-factored or expanded, that breaks (I believe) the files saved with the older format. Things like XML and JSON are more resilient to future change, but I feel like I'm falling into the trap of using XML as my "golden hammer" so-to-speak. A database seems overkill for basically all of the applications I develop.

What are some common options, and I'm sure there's many, that I'm not considering? Can you describe when each of these options is best used and why its the best choice?

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません softwareengineering.stackexchange
scroll top