Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readability for what happens with subscriptions when an aggregated object is updated #424

Open
henning-roos opened this issue Jan 15, 2020 · 0 comments
Labels
code improvements Improvements to make the code base more readable and manageable.

Comments

@henning-roos
Copy link
Member

henning-roos commented Jan 15, 2020

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.

Possible Drawbacks

@henning-roos henning-roos added the code improvements Improvements to make the code base more readable and manageable. label Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code improvements Improvements to make the code base more readable and manageable.
Projects
None yet
Development

No branches or pull requests

1 participant