Let's say I have a very simple program that adds/edits/removes and lists products, and I don't want to make the user install a data base in his machine. Would it be a bad idea to store all the products in a single class and then serialize/save it whenever a change is made?
The class would be something like this for example:
public class MyProducts implements Serializable {
    private List<Product> products;
    public void AddProduct(Product p) {
        // Adds a product...
    }
    public void RemoveProduct(Product p) {
        // Removes a product...
    }
}
Have in mind that it would be a simple program, nothing critical, just so that I don't need to bother with relational data base in such a simple software.
Scenario 2: In a real software, would it be a good idea to store the program's configuration/preferences in a serialized file?
Thanks!
 
    