On Tue, Mar 1, 2011 at 11:51 PM, Emmanuel Lecharny <[email protected]>wrote:

> 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.
>
>
Yes you're right. Serialization is an aspect that is applied on the
interface rather on a specific implementation. It's best to have it
separate.

The best way sometimes to figure out the right path is just start coding.
The problems come out and show you the path.

Regards,
Alex

Reply via email to