Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Data that is transferred between processes, persisted in the database, or exported to file, must be serialized.  implements Image Added implements its own serialization mechanism for input and output streams, where each object to be serialized is referred to as a Storable. The serialization also includes a version control mechanism where an object can populate itself differently depending on the version of the incoming stream.

In the DTK there is only one programmatic interface for handling object serialization. Classes for this are located in the package devkit.storable. However, depending on the target,  handles the system handles serialization in two different ways:

  • Plain streams

    Plain streams are used in a running system. As with regular Java serialization, it is imperative that each element is written and read in the exact same order. For performance reasons these stream types are used within a running system in interclient communication.

  • XML

    In XML streams, each element is associated with a user defined name tag. The tag is used to locate the value. XML streams are used for database persistence and when objects are exported to a file, imported into another system another Image Added system and during upgrades. The XML stream provides the ability to make use of a supplied version number to be able to automatically upgrade a configuration in a running system.

...

Note
titleNote!

All storables that are to be persisted, in either the database or exported/imported in, must have names defined. Other storables may use null, however, it is encouraged to always use unique name tags.

...