mardi 13 juillet 2021

How loose coupling is better than tight coupling? [example in Java preferred]

There are some advantages of losse coupling over tight coupling. Ref

  1. Tight coupling is not good at the test-ability. But loose coupling improves the test ability.
  2. In Tight coupling, it is not easy to swap the codes between two classes. But it’s much easier to swap other pieces of code/modules/objects/components in loose coupling.
  3. Tight coupling does not have the changing capability. But loose coupling is highly changeable.

I am not getting how can this helpful.

Aucun commentaire:

Enregistrer un commentaire