Pathologies of Tight Coupling
We continue our conversation on code qualities with a discussion of why tight coupling is undesirable. Again, I want to stress, as I did in the last post, that we’re not striving for no coupling in a system. A system with no coupling is a system that does nothing. We want the right kind of coupling in the right places that gives us the flexibility we need but also allows us to apply the business rules we need in the right places.
Perhaps the worst kind of bad coupling in a system is global variables. Don’t get me started. I hate global variables, and I see a lot of them everywhere. They show up in all sorts of guises so most of you wouldn’t even recognize them as global variables. Do you use read-write singletons? Or service locators? Or value objects? These are all other names for global variables.
via DZone.com Feed https://dzone.com
May 22, 2017 at 06:09PM