Relative Content

Tag Archive for persistence

How do I make a domain model that doesn’t violate OOP?

My game reads a number of JSON files, deserializes them, and hands the resulting objects off to the classes that need them. These deserialized objects, which can be thought of as the domain model, are normally very simple:

Persisting type in Java – should I be using flags?

Is there some specific piece of advice around persist values that indicate type? Specifically I want to know if I should persist a flag/state indicating the type in persistence or not. I get the feeling I’m forgetting/not understanding some core concept of OO or data modelling.

Persisting type in Java – should I be using flags?

Is there some specific piece of advice around persist values that indicate type? Specifically I want to know if I should persist a flag/state indicating the type in persistence or not. I get the feeling I’m forgetting/not understanding some core concept of OO or data modelling.

What’s a good way to make sure that locally serialized data can be deserialized in newer code?

Context: I’m working on an HTML 5 game without persisted state. Every time you refresh the page, you start at the beginning. People are requesting that they can start where they left off if they leave the page. I plan to implement this as Local Storage. The thing that makes apprehensive about this is a new kind of bug I’ll have to consider: If you come back and there’s a newer code, it may not be able to deserialize the storage.