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

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

  • 相关阅读:
    小程序 筛选
    Travel 项目环境配置
    ajax
    vue 项目编译打包
    自学网
    使用npm打包vue项目
    vue音乐播放器项目 二级路由跳转
    better-scroll (下拉刷新、上拉加载)
    Linux命令
    hibernate存储过程 3
  • 原文地址:https://www.cnblogs.com/mayZhou/p/10550047.html
Copyright © 2011-2022 走看看