I am creating an implementation that does the conversion from one form to another.
The design problem that I am facing right now is whether Encoder and Decoder API should be in the same interface or in separate ones. for example 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 placing them in one interface is that you can centralize implementations and fix any protocol changes in one place. Any thoughts on this?
source
share