Thursday, April 19, 2012

Working against CDK interfaces instead of implementations

For quite some time now, we have been working on factoring out the data module implementation of the interfaces. These classes were originally all we had, even before interfaces were introduced. Since then, the CDK adopted other implementations, like silent and datadebug. In time, more and more code became independent of implementations, and I just finished another set of eight patches so that even qsarmolecular is independent from the implementations. Thus, now you can even calculate descriptors with the silent implementation.

This is the dependency graph I created from this patch:

The data module is found in the middle right, and still a few modules depend on it. These modules, like pdb and libiomd, often have classes extending classes from the data module. These are much harder to make independent.

The patches do a few things, including:

  • make Elements use a custom (immutable) IElement
  • introduce a new fragment module allowing removal of some last dependencies on extra