7.9 GRASP原则九: 隔离变化

GRASP原则九: 隔离变化

   Protected Variations

   需求一定会变化的!如何做到以系统的局部变化为代价就可以应对这一点?
4.1 GRASP rule9: Protected Variations

   Name: Protected Variations 隔离变化

   Problem: 如何设计对象、系统和子系统,使得这些成分里面的变化因素、 不稳定因素不会对系统的其余

    部分造成意想不到的影响?

    How to design objects, systems and subsystems so that the variations and instability in these

    elements does not have an undesirable impact on other elements?

   Solution: 标识出能够预计的变化点或者不稳定点,职责分配的时候创建一 个稳定的接口,把它们与

    系统的其余部分隔离开来

    Identify points of predicted variation or instability; assign responsibilities so that you create

    a stable interface around them

   “隔离可能的变化”是一个设计原则,它鼓励使用一个稳定的接口来封装可以 预知的变更点。以下技巧都使

    用了PV

     数据封装 、多态 、数据-驱动设计, 服务查询,配置文件、接口

     ….等都是这种机制的不同实现
     隔离变化是一种高度抽象的原则,指导了设计和编程过程的大多数机制、模式programming
4.3 Protected Variations: discussion

   需要注意的两种可能的变化点

     变化点: 在当前系统或者当前需求中已经存在了

      Variation point: variations in the existing current system or requirements

     演化点: 推测的类型变化可能发生在今后,但在当前的需求中 不存在

      Evolution point: speculative types of variation that may arise in the future, but which are not

      present in the existing requirements

转载于:https://www.cnblogs.com/mayZhou/p/10550050.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值