Question

I have different data modules, which take a couple of parameters from a configuration list. Do you think it's ok to pass a configuration object as a whole module1(config) and let the module pick what it needs, or should I rather pass the individual parameters module1(config.a, config.c, config.f)? The first case doesn't require change interfaces in case I need more configuration parameters, but the second case encapsules more?

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top