D
dmcreyno
I have a need to export an object hierarchy to several different
formats (xml, pdf, msword, etc). Each format will contain unique
information about the obejcts. For instance, the word doc might contain
information about the object's depth in the structure while the pdf
version omits this info.
I was trying to play around with serialization (as opposed to
toString()), so that I could encapsulate the unique behaviors in
decorator classes. That way, to change the protocl, all I need to do is
change the decorator. If I need a new protocol, then the only existing
code that gets changed is the decorator factory and the client making
use of the factory. The underlying algorithm should be unaltered.
I've had somewhat limit success with Externalizable. thoughts? ideas?
am i smoking crack?
formats (xml, pdf, msword, etc). Each format will contain unique
information about the obejcts. For instance, the word doc might contain
information about the object's depth in the structure while the pdf
version omits this info.
I was trying to play around with serialization (as opposed to
toString()), so that I could encapsulate the unique behaviors in
decorator classes. That way, to change the protocl, all I need to do is
change the decorator. If I need a new protocol, then the only existing
code that gets changed is the decorator factory and the client making
use of the factory. The underlying algorithm should be unaltered.
I've had somewhat limit success with Externalizable. thoughts? ideas?
am i smoking crack?