zoukankan      html  css  js  c++  java
  • 7.8 GRASP原则八: 间接 Indirection

    GRASP原则八: 间接 Indirection
       若两个对象直接连接,导致耦合太紧,如何解决?
    3.1 GRASP rule8: Indirection 间接

       Name: Indirection

       Problem: 把职责分配到哪里可以避免两个或者多个对象之间的 直接耦合?如何解耦对象以保持较高的可重

        用性?

        Where to assign a responsibility to avoid direct coupling between two or more objects? How to

        de-couple objects so that reuse potential remains higher

       Solution: 把职责分配给一个中介对象,隔离对象与其他构件或 者服务,使它们不产生直接耦合

        Assign the responsibility to an intermediate object to mediate between other components or services

        so that they are not directly coupled

           因为中介对象是一种特殊的作用,一般对象与中间对象之间的直接耦合, 相对比较简单

  • 相关阅读:
    使用python写天气预告
    beef配合ettercap批量劫持内网的浏览器
    html布局
    python 使用paramiko模块上传本地文件到ssh
    mysql一些函数的记录
    python与ssh交互
    html笔记4
    html笔记3
    html笔记2
    html笔记1
  • 原文地址:https://www.cnblogs.com/mayZhou/p/10550047.html
Copyright © 2011-2022 走看看