zoukankan      html  css  js  c++  java
  • 敏捷开发原则与实践(二)

    In 1992, Jack Reeves wrote a seminal article in the C++ Journal entitled “What is Software Design?” In this article, Reeves argues that the design of a software system is documented primarily by its source code. 源码就是设计。UML diagrams 也许能够展示一部分设计,但它不是设计的全部。只有源码才是设计。非常推荐这篇文章!!!

    Design Smells – The Odors of Rotting Software

    •   Rigidity – The system is hard to change because every change forces many other changes to other parts of the system. 僵化=难于修改
    •   Fragility – Changes cause the system to break in places that have no conceptual relationship to the part that was changed. 脆弱=一改就乱
    •   Immobility – It’s hard to disentangle the system into components that can be reused in other system. 难以提取独立出来
    •   Viscosity – Doing things right is harder than doing things wrong. 粘滞=做好事难。比如编译时间太长,开发人员就会倾向于修改只需要部分编译的代码,即使这样修改与设计冲突。
    •   Needless Complexity – The design contains infrastructure that adds no direct benefit. 没必要的复杂=过度设计。我们应该保持设计的flexible,而不是一开始就认为后续会有很多变化,从而把架构写的很复杂。如何保持?看后面介绍的原则,以及测试驱动会驱动你的。
    •   Needless Repetition – The design contains repeating structures that could be unified under a single abstraction. 重复=滥用粘贴
    •   Opacity-It’s hard to read and understand. it does not express its intent well.晦涩=代码难懂

    What Stimulates the Software to Rot?

    主要原因来至需求变化,而且经常要求快速实现需求,导致开发人员写出各种违反原设计的代码,慢慢的Smell就产生了。

    然而,我们不能责怪需求的变化。If our designs are failing due the constant rain of changing requirements, it is our designs and practices that are at fault. We must somehow find a way to make our designs resilient to such changes and employ practices that protect them from rotting.

  • 相关阅读:
    NFC性价比高频读卡器首选方案:FM17550
    关于ESP8266和ESP8285的对比
    有没有比NRF51822更好的智能穿戴蓝牙方案
    zigbee CC2530首选方案模组:TZU06A1
    PAN3501兼容AS3933-BTST
    NRF51822和NRF52832的主要区别
    集成模拟温度传感器低成本2.4G CC2500RGPR 中文手册
    USB2.0主机控制器 UPD720114 简单详解
    存储器HK1225-7EQ 使用说明书资料
    爬虫 + 数据
  • 原文地址:https://www.cnblogs.com/ustbdavid/p/3415226.html
Copyright © 2011-2022 走看看