What is the difference between loose coupling and tight coupling in the object oriented paradigm?

前端 未结 16 2032
粉色の甜心
粉色の甜心 2020-11-22 08:03

Can any one describe the exact difference between loose coupling and tight coupling in Object oriented paradigm?

16条回答
  •  清歌不尽
    2020-11-22 08:53

    When two objects are loosely coupled, they can interact but have very little knowledge of each other.

    Loosely coupled designs allow us to build flexible OO systems that can handle change.

    Observer design pattern is a good example for making classes loosely coupled, you can have a look on it in Wikipedia.

提交回复
热议问题