D
Dave Veeneman
When does serializing objects make more sense than persisting them to a
database? I'm new to object serialization, and I'm trying to get a feel for
when to use it.
Here is an example: I'm writing an accounting application. I have a chart of
accounts in the form of a containment hierarchy. A GeneralLedger contains a
number of Accounts, and each of these Accounts can contain a Aubledger,
which contains its own Accounts, and so on. The chart of accounts is loaded
when the app initializes and stays in memory until the app terminates. I
also have lots of transactions, which are read from the database and mapped
into Transaction objects as needed, using the chart of accounts to filter
the selection.
For a moment, disregard the database design issues involved. Does it make
sense to serialize a containment hierarchy like the chart of accounts,
rather than persisting it to the database? Is that how one would normally
use object serialization?
Thanks in advance!
database? I'm new to object serialization, and I'm trying to get a feel for
when to use it.
Here is an example: I'm writing an accounting application. I have a chart of
accounts in the form of a containment hierarchy. A GeneralLedger contains a
number of Accounts, and each of these Accounts can contain a Aubledger,
which contains its own Accounts, and so on. The chart of accounts is loaded
when the app initializes and stays in memory until the app terminates. I
also have lots of transactions, which are read from the database and mapped
into Transaction objects as needed, using the chart of accounts to filter
the selection.
For a moment, disregard the database design issues involved. Does it make
sense to serialize a containment hierarchy like the chart of accounts,
rather than persisting it to the database? Is that how one would normally
use object serialization?
Thanks in advance!