Description
Description
Create a "recipe" method describing all steps that happens with subscriptions when an aggregated object is updated. This means to create a series of calls to methods with descriptive names. There would be no need to add comments as long as the method names are named in a meaningful manner.
Motivation
Today it is very hard to follow all the steps that are triggered after an aggregated object is updated. It is necessary to follow long and deep function call chains in order to find out what is going on. It would be much easier if we have a "recipe" method on higher level that details all major steps (each step is represented by a high level method etc.).
Exemplification
This is pseudo code of what such a "recipe" method could look like.
public void updateAggregatedObject() {
prepareObject();
checkMatchingConditionsOnObject();
addParametersToObject();
...
}
Benefits
Cleaner code. Easier to test and read.