Re: Policy for Dynamic Modules



Hello Fabien,

Fabien Parent <parent f gmail com> a écrit:

> What is the current policy about dynamic modules (i.e. when
> should(n't) I create a dynamic module ?) ?

That is a good question.  I have never thought about writing down a
policy about this, maybe because I don't really know myself :-)

More seriously, I think a dynmod is an appropriate vehicle for
components for which we either want to:

      - Clearly separate its interface from its possibly different
      implementations.  E.g, the debugging engine is a dynmod that
      exports the IDebugger interface.  The current implementation of
      that interface uses GDB, but it could use other implementations;
      for instance, if Solaris people have a low level debugging
      component, they could write an implementation of IDebugger for
      their platform.

      - Provide dynamically (de)activable features.  For instance, the
      debugging perspective (all the widgets that collaborate to provide
      the debugging experience in Nemiver today) is a dynmod.  One could
      think about adding a new perspective that would be tailored for
      doing e.g, memory debugging based on Valgrind.  That new memory
      debugging perspective could be loaded separately in what would
      look like a separate tool to the user, but would still leverage
      the common code infrastructure that is already present in
      Nemiver.  Or it could be designed to be integrated with the
      debugging perspective we have today.

I also thing the component that is going to be organized as a dynmod
needs to be reasonably significant.  I.e, turning what would otherwise
be a smallish class into a dynmod would probably not be worth the
effort.

Ultimately, I guess choosing to turn something into a dynmod or not is
mostly a matter of judgment call.  When I am not sure, I tend to fear
the over-engineering syndrome so I just start small and then, as the
module I am hacking on grows, I turn it into a dynmod when it makes
sense to me.

I hope this helps.

-- 
		Dodji


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]