[bind10-dev] proposal: separate ModuleCCSession and ConfigData

Michal 'vorner' Vaner michal.vaner at nic.cz
Wed Apr 4 07:11:10 UTC 2012


Hello

On Tue, Apr 03, 2012 at 11:25:04AM -0700, JINMEI Tatuya / 神明達哉 wrote:
> > If we would have the ConfigData class, I think the
> > ModuleCCSession should inherit from it, because handling own config data should
> > contain all the things as handling any config data (merging the configurations,
> > etc). It would just need some more code for validation, etc.
> 
> Hmm, I'm afraid I don't follow this logic.  BTW, there is indeed a
> ConfigData class right now, and ModuleCCSession inherits from it.  I
> actually thought that relationship was one reason why ModuleCCSession
> had now so many responsibilities and was much complicated, and I
> proposed to stop doing the inheritance for clearer separation of
> responsibilities.

OK, I'll try to simplify it a little bit.

Both the ModuleCCSession and the ConfigData classes handle some config, right?
The ModuleCCSession is for the config of the current module and the ConfigData
for some foreign one. But this shares a lot of functionality. I don't care much
what exact technique is used to share the code, but I think stuff like merging a
config update and calling an update hook is something to be written just once.
So maybe (with better naming):

                ConfigPart (or ConfigModule, or ConfigData)
                /                          \
               /                            \
            LocalConfig                    RemoteConfig
            (Does stuff like
            validating the config)
           /
          /
      ModuleCCSession
      (Adds command hooks)


Anyway, your proposal looked like there'd be no relation between the two, but
they both would contain a bit of common code, which would then be duplicated.

With regards

-- 
XML is like violence. If it doesn't solve your problem, use more.

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20120404/17b51de3/attachment.bin>


More information about the bind10-dev mailing list