Omnibase and subclasses of OrderedCollection

Cees de Groot cg at cdegroot.com
Tue Jun 10 18:13:14 UTC 2003


On Tue, 2003-06-10 at 04:56, Derek Brans wrote:
> Why does OrderedCollection need a unique class-identifier byte?  Is it
> because it uses custom marshalling?
> 
Probably more as a bootstrap for marshalling - if you do custom
marshalling for a class, you don't need to manually assign class
identifiers (also see some remarks on my (erroneous) explanation of
OmniBase serialization on the OmniBase Swiki by David).

> As an aside, wouldn't any subclass of OrderedCollection get marshalled and
> unmarshalled as an OrderedCollection, instead of the subclass?  If so, isn't
> that bad?
> 
No, I don't think it will. But then, I have always resisted the
temptation to subclass inside the Collection hierarchy ;-). Try it, I'd
say...

> Also, suppose I want to implement BlockContext serialization (ie I don't
> need my database to be dialect neutral).  Can't I have that option?
> 
Of course. Just remove the exception-generating code in BlockContext ("you cannot
marshall me") with something that serializes the BlockContext. I've tried it once, 
but got bitten by the problem of where to stop tracing the transitive closure
from a given instance - my database started to fill with most of my image ;-). 
This was in VW, where Namespaces got serialized by value instead of by name (like
classes etcetera should be serialized). But if you can cook up a satisfactory
external representation of a BlockContext, nothing stops you from dumping it
in an OmniBase db....



More information about the Squeak-dev mailing list