Still two questions remain a little the same. My main concern for static classes is inheritance and accessibility.
By using a static class (public in the worst case) everyone can access your processes and functions. Which in most cases is not what you want. For some objects, itโs too easy to get to your functions and make some changes. Thus, addiction injection is good to use. (Pass the object you want to change in the parameters, in this case your process-object ).
So that others can not manipulate your process-object , why not try to use some kind of singleton template (or even an ex-singleton template), so that there really is a real object for communication? You can pass the object to the parameters of your functions if something needs to be changed. And then you can only have one manager that holds your process-object . Others should not fall into the facility.
Static classes are also hard to inherit. Overriding static methods seems a bit odd. Therefore, if you are sure that the process will not be the only process, and some more specific processes will be created by you, then a static class should be avoided.
source share