Skip to main content

Timeline for Coupling: Theory vs Reality

Current License: CC BY-SA 4.0

3 events
when toggle format what by license comment
Feb 17, 2020 at 13:48 comment added Stephen Byrne In this case, both A and B are indeed individually coupled to the Readable interface. But they are not at all coupled to each other. So the total "amount" of coupling doesn't get reduced, but the coupling between A and B does. That's the main point, because now B can change (or disappear completely) without having any effect on A.
Feb 17, 2020 at 8:38 comment added Asier Naiz The client code still uses the same methods as before. Regardless File is exposed as a class or via an interface the call coupling remains the same: read and close methods are called. You seem to explain that coupling is reduced reducing the number of exposed methods of File via Readable. But the exposed methods are the dependencym and they were before creating the interface. Nothing changed, coupling is the same.
Feb 17, 2020 at 1:28 history answered 9000 CC BY-SA 4.0