BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: Some OPF details...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design
View previous topic :: View next topic  
Author Message
Paul Nicholls
Guest





PostPosted: Wed Jul 16, 2003 4:16 am    Post subject: Re: Some OPF details... Reply with quote



I think it would make more sense to use IDataEncoder and IDataDecoder at the
ISerializableObjectStorage level (when the objects are serializing and
unserializing)?

Anyone?

"Paul Nicholls" <paul-nicholls (AT) hotmail (DOT) com> wrote

Quote:
Hi all, I have made an interface, ISerializableObject, that objects can
implement if they want to implement 'serialization' and 'UnSerialization'
of
themselves.

I also have an interface, ISerializableObjectStorage, that other objects
can
implement if they want to allow the 'storage' and 'retrieval' of
ISerializableObject classes (File,UDP, TCP, Database, etc). These
interfaces add up to a simple OPF if you will :-)

This works fine (mainly the ISerializableObject as I haven't done much
with
the ISerializableObjectStorage yet), but now I was thinking that having
two
other interfaces, IDataEncoder and IDataDecoder, I could 'plug in' any
type
of encoding and decoding scheme I wanted into this mix. This would be
good
for compression and/or encryption down the track.

My 'dilemma' is that I'm not sure at what level I should utilise
IDataEncoder and IDataDecoder, at the ISerializableObject level (when the
objects are serializing and unserializing), or at the
ISerializableObjectStorage (when the objects are being stored and
retrieved)...




Back to top
Paul Nicholls
Guest





PostPosted: Wed Jul 16, 2003 4:19 am    Post subject: Re: Some OPF details... Reply with quote



I think it would be more 'efficient'? to use the IDataEncoder and
IDataDecoder interfaces at the ISerializableObjectStorage level?

Anyone?

"Paul Nicholls" <paul-nicholls (AT) hotmail (DOT) com> wrote

Quote:
Hi all, I have made an interface, ISerializableObject, that objects can
implement if they want to implement 'serialization' and 'UnSerialization'
of
themselves.

I also have an interface, ISerializableObjectStorage, that other objects
can
implement if they want to allow the 'storage' and 'retrieval' of
ISerializableObject classes (File,UDP, TCP, Database, etc). These
interfaces add up to a simple OPF if you will :-)

This works fine (mainly the ISerializableObject as I haven't done much
with
the ISerializableObjectStorage yet), but now I was thinking that having
two
other interfaces, IDataEncoder and IDataDecoder, I could 'plug in' any
type
of encoding and decoding scheme I wanted into this mix. This would be
good
for compression and/or encryption down the track.

My 'dilemma' is that I'm not sure at what level I should utilise
IDataEncoder and IDataDecoder, at the ISerializableObject level (when the
objects are serializing and unserializing), or at the
ISerializableObjectStorage (when the objects are being stored and
retrieved)...



Back to top
Joanna Carter
Guest





PostPosted: Wed Jul 16, 2003 8:58 am    Post subject: Re: Some OPF details... Reply with quote



Paul Nicholls wrote:

Quote:
I think it would be more 'efficient'? to use the IDataEncoder and
IDataDecoder interfaces at the ISerializableObjectStorage level?

I would definitely agree; the object itself should have no awareness of how
it is stored, encoded, etc.

Joanna

--
Joanna Carter
Consultant Software Engineer
TeamBUG support for UK-BUG
TeamMM support for ModelMaker



Back to top
Bob Dawson
Guest





PostPosted: Wed Jul 16, 2003 12:32 pm    Post subject: Re: Some OPF details... Reply with quote

"Paul Nicholls" wrote
Quote:
[...] at the
ISerializableObjectStorage level (when the objects are serializing
and unserializing)?

Anyone?

Concur. The core issues here for me is control: it makes sense to say that a
serialized object would have no knowledge of whether it was being
transported over a secure or unsecure channel, but little sense for the
ObjectStorage inteface not to know how to prepare what it stores. The
secondary issue is that of covariance: do compression/encryption tend to
vary by object serialized, or by connection type? I'd think the latter, so
both issues lead me to making this a part of the ISerializableObjectStorage,
not the ISerializableObject.

bobD



Back to top
Paul Nicholls
Guest





PostPosted: Wed Jul 16, 2003 11:07 pm    Post subject: Re: Some OPF details... Reply with quote

It makes me glad we agree on that point, as I must be on the right track :-)

"Joanna Carter" <joannac (AT) btinternet (DOT) com> wrote

Quote:
Paul Nicholls wrote:

| I think it would be more 'efficient'? to use the IDataEncoder and
| IDataDecoder interfaces at the ISerializableObjectStorage level?

I would definitely agree; the object itself should have no awareness of
how
it is stored, encoded, etc.

Joanna



Back to top
Paul Nicholls
Guest





PostPosted: Thu Jul 17, 2003 2:11 am    Post subject: Re: Some OPF details... Reply with quote

Thanks for the reply Bob :-)

"Bob Dawson" <RBDawson (AT) prodigy (DOT) net> wrote

Quote:
"Paul Nicholls" wrote
[...] at the
ISerializableObjectStorage level (when the objects are serializing
and unserializing)?

Anyone?

Concur. The core issues here for me is control: it makes sense to say that
a
serialized object would have no knowledge of whether it was being
transported over a secure or unsecure channel, but little sense for the
ObjectStorage inteface not to know how to prepare what it stores. The
secondary issue is that of covariance: do compression/encryption tend to
vary by object serialized, or by connection type? I'd think the latter, so
both issues lead me to making this a part of the
ISerializableObjectStorage,
not the ISerializableObject.

bobD





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.