I'm looking at developing a simple application in Java for a game which allows a user to keep track of which items they own and how much experience they have obtained while using the item. All of this data is input by the user. What is the idiomatic/standard way to persist the data that is being manipulated (the model)? The immediate possibilities seem to be saving it to a file, serialization, databases, etc, but many of these seem to be overkill for simple text fields that don't seem to necessitate objects. What is the idiomatic/traditional way to handle something like this?
What is the idiomatic way to persist the data in this simple data-based application?
java;design;serialization
SQLite is a nice, lightweight database application. Some of the NoSql databases are easy to download and get running quickly, with low learning curve. I've heard Redis is pretty easy for saving simple data. MongoDB is very accessible as well, if you just use the basic features and don't worry about the complicated bits.Managing everything in flat files on disk would work, too, but my guess is that the time it would take to define file formats, serialization, random access, and all the tricky parts -- with all the unit tests because you don't want a bug to corrupt your data -- then it would take more time and effort than just launching and learning something easy like SQLite or Redis.