I was a bit optimistic saying that we should merge the serializers with the classes that are operating on : the problem is that if we do that, we will have to call methods like :
DefaultEntryAttribute.serialize()

Not very convenient. I think it's probably better to have an EntryAtrributeSerializer helper class instead of static methods in classes. As a matter of fact, for Entry, we may have bigger trouble : should the methods be injected into DefaultEntry ? Or ClonedServerEntry ? Or ImmutableEntry ? Or ClonedServerEntrySearch ? ...

See what I mean, I guess.

On 3/1/11 4:58 PM, Emmanuel Lecharny wrote:
Hi guys,

Last week, I started to rewrite the serializers, creating some dedicated classes for each element needing to be serialized.

Each class contains a serialize()/deserialize() method.

I'm now wondering if it wound't be better to simply move those static classes into the main classes being serialized/deserialized. Alex does think so, and I'm on line whith his option.

The reason why I created an additional class was to avoid modifying the main classes. Also not that the class implementing Externalizable will call those dedicated methods.

Thoughts ?



--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to