In a recent code refactor, I'm fulfilling an idea that isolates data handling from data itself. It's something like Chain-of-responsibility - processing units providing the ability to handle the data within a particular business scope while data object being passed on through the whole processing chain.
A further optimization is done by "singletonizing" the processing chain instance. Considering potential concurrence problem, eliminating any private data reference in these processing units is desired.
So, I wonder if there is some programming paradigm which can suggest other programmers conform this pattern while they are doing modification in the future.
Thanks in advance~