Hacker News new | past | comments | ask | show | jobs | submit login

This is the only reason why DI frameworks exist. However, this issue can be largely avoided by working with configuration objects (parameter objects [0]) from the start, that get passed around. Then you only need to apply the change in a small number of parameter-object classes, if not just a single one.

[0] https://wiki.c2.com/?ParameterObject




Eh, having built a whole codebase around these configuration objects I really regret not going for more traditional DI IoC container. It's thousands over thousands of additional parameters passed all over the place when creating objects just for the sake of saving five minutes of explanation to newcomers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: