Reputation: 2956
guys. I'm not asking here a particular question. The question is: what is your opinion on .NET IExtensibleDataObject interface and the whole mechanism used in terms of stability? Have you used it? Is that a reasonable solution if I suspect that my business object shall morph with time? It seems that it can support new members in new versions of a class, but it seems that IExtensibleDataObject class implementation is NOT stable to the changes to old member types. May be you have some criticism about this mechanism and I will be glad to hear it.
Upvotes: 0
Views: 325
Reputation: 1062895
It does its job, which is to allow you to safely round-trip unexpected data without loss. Allowing old clients to talk to new servers, and new clients to talk to old servers.
Re "changes to old member types"; if you mean you've changed the definition of an existing member, then frankly all bets are off. Most serializers work on a contract (implicit or explicit) about the data. If you change a member, you have broken the contract.
It is generally better to replace a member rather than change it; or better - version the entire DTO (i.e. release a new contract, that is independent to the original).
Actually, my biggest gripe about this interface is that it deals with a concrete implementation (ExtensionDataObject
). But that is more related to my specific whims, from the perspective of someone who maintains a serialization utility library...
Upvotes: 1