Re: Reflection and order of the fields
From: Kevin P. Fleming (kpfleming_at_backtobasicsmgmt.com)
Date: 03/08/04
- Next message: Angela: "Counting Lines of Code in Solution"
- Previous message: fbhcah: "RE: REALLY BIG problem with DATA GRDI"
- In reply to: Frank D Lombardo: "Re: Reflection and order of the fields"
- Next in thread: Frank D Lombardo: "Re: Reflection and order of the fields"
- Reply: Frank D Lombardo: "Re: Reflection and order of the fields"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 08 Mar 2004 11:49:58 -0700
Frank D Lombardo wrote:
> Because of my specific serialization requirements, I was hoping to write my
> own generic command serializer that would use reflection to determine the
> run-time data fields of the command and send them over the wire. I'm just
> not sure if I can rely on the declarative order of the fields being the
> order that they are returned from GetFields().
But this technique breaks all the normal rules of object oriented
programming :-)
Why don't you want the command objects to be able to
serialize/deserialize themselves? There shouldn't be any reason to use
reflection here, and even if GetFields() could return the field in some
predetermined order, are you going to otherwise ensure that both ends of
this link are always be using the same versions of these command
objects? If not, you need a more tolerant serialization mechanism.
- Next message: Angela: "Counting Lines of Code in Solution"
- Previous message: fbhcah: "RE: REALLY BIG problem with DATA GRDI"
- In reply to: Frank D Lombardo: "Re: Reflection and order of the fields"
- Next in thread: Frank D Lombardo: "Re: Reflection and order of the fields"
- Reply: Frank D Lombardo: "Re: Reflection and order of the fields"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|