I'm creating an implementation that performs conversion from one form to another.
The design problem I am facing now is whether the Encoder and Decoder API should be in one interface or in separate ones. e.g. Apache MINA uses separate interfaces
I am currently doing something like this:
interface Convertor
{
A encode( B b );
B decode( A a );
}
The rationale for putting them in one interface is that you can centralize the implementations and fix any protocol changes in one place. Any thoughts on this ?