Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

As part of my ongoing effort to solve NARC-11 Stop using the JMS queues for queuing snapshot harvests I've it run into the HarvestDefinition class, and I'm a bit confused about what this classes purpose is. The name of the class and the first part of the class description implies this a clean data entity, but the last part of the description and the implementing code contains functionality for generation Job objects based on the HarvestDefinition and write these job to the database. This set of extra 'useful' functionality might seem like a good idea, but the problem is that responsibility of the HarvestDefinition class isn't any longer clearly defined.

One of the very most efficient ways to lose control of your OO design, is to muddle the responsibilities of the components/classes making up your system. In OO, classes are meant to function as logical partitions of the different problem areas of the system, enabling us to reduce the system complexity and allow developers to focus on small isolated sections of code when manipulating the code. Th resposibilities The responsibilities of a class can be categorized into two disjunct sets:

...