Currently, several methods within defaults.py deal with similar areas (such as getting statistics, for example). Although this is so, they are separated into different methods and there is nothing tying them together as a single unit.
Solution
Having separate methods is good, but we also want a way to identify how certain objects are tied together. A solution to this is applying aggregates. This allows for clarity in domain driven design. Additionally, it allows for invariants to be applied and maintained to closely related objects, rather than having it applied to each object individually.
How?
This was done by adding roots for Statistics, Colors, and Plots. As these are our roots, we can treat the methods within them as a single unit when it comes to things such as invariants.
Please Note**** that these changes are part of a school project.
Problem
Currently, several methods within
defaults.py
deal with similar areas (such as getting statistics, for example). Although this is so, they are separated into different methods and there is nothing tying them together as a single unit.Solution
Having separate methods is good, but we also want a way to identify how certain objects are tied together. A solution to this is applying aggregates. This allows for clarity in domain driven design. Additionally, it allows for invariants to be applied and maintained to closely related objects, rather than having it applied to each object individually.
How?
This was done by adding roots for
Statistics
,Colors
, andPlots
. As these are our roots, we can treat the methods within them as a single unit when it comes to things such as invariants.Please Note**** that these changes are part of a school project.