[bind10-dev] Ruminations on difference normalization (#1456)

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Tue Dec 20 18:53:45 UTC 2011


At Sun, 18 Dec 2011 23:02:01 +0100,
Jelte Jansen <jelte at isc.org> wrote:

> > - The current xfrin implementation actually uses a separate 'Diff'
> >   class, as a top level wrapper of the bare updater class.  To me,
> >   a similar approach seems to make most sense.
> 
> If the use of such a class is essentially mandatory to work with every
> datasource, it becomes the real API, and we might as well implement that
> directly. Otherwise, you risk the chance that you get some modules that
> only work with some datasources (and I am not thinking of NotImplemented
> cases).

Right, but I think it's not so uncommon that some modules are
effectively considered quite internal even if the interfaces are
public.  (To me) the question is whether the multiple things need to
be inherently coupled within a single class (e.g., when there needs to
be a single lock to protect access to them at the same time).  If they
do, there's probably no other option than pushing them into a single
class.  If not, I'd first consider the option of separating them in
the sense of giving one minimal responsibility to each class, which
generally improves testability and maintainability.

But, as I noted in my first response, the differences may be quite
subtle and may sometimes be a matter of personal preferences.  If
different opinions/preferences cannot easily converge we should
probably just pick up one and move forward (in which case I'm okay if
it's not the one I would prefer).

---
JINMEI, Tatuya



More information about the bind10-dev mailing list