zoukankan      html  css  js  c++  java
  • [Study Note] Design and Testability 20100423

    [Jeremy’s Third Law of TDD: Test Small Before Testing Big]

    Test Driven Development is an important and valueable tool to achieve rapid feedback cycles, but only if write and test software in small pieces.

    • Coding in an efficient manner, and sustaining that efficiency over time
    • Enabling continuous and adaptive design techniques
    • Designing an application that is resilient in the face of change
    • Faster removal of defects from code
    • Making an application easier and quicker to test

    Case Study #1 Code from the Bottom Up

    Purposely Designing with Test Driven Development

    TDD is designing while coding.

    class stereotypes

    1. Service providers – classes that perform a specific operations
    2. Information Holders – classes that have, or provide, data to other classes
    3. Coordinators – classes that coordinate the activities of other classes
    4. Controllers – classes that control the application flow

    The key of doing emergent design is to focus on creating the service provider and information holder classes first that perform small tasks. After these classes are built and tested the construction of the coordinator and controller classes often turns into a simple game of “connect the dots”. Get the business logic and the workflow decisions complete first. Push off tasks like configuration and even data acccess closer to the end. Let the needs of business logic and workflow dictate the interface and design of ancillary services.

    Drive design from the behavior of the business objects and then work forward to the service point and backwards to the data store.

  • 相关阅读:
    Windows Azure入门教学系列 (九):Windows Azure 诊断功能
    批量删除同类文件的函数
    Edit 的使用
    @ 与 ^ 运算符
    窗体相关操作
    uses 子句的写法
    goto 语句
    字符串常识
    not 与整数
    Memo 的当前行、当前列与当前字符
  • 原文地址:https://www.cnblogs.com/zhaorui/p/1719039.html
Copyright © 2011-2022 走看看