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.

  • 相关阅读:
    git submodule的使用
    Git 工具
    Simple Rtmp Server的安装与简单使用
    Java 获取当前系统的操作系统类型
    OA系统 权限管理的设计流程
    基于角色访问控制的OA系统的设计与实现
    Neo4j:Index索引
    Neo4j Cypher查询语言详解
    win10命令行kill进程
    用BlazeMeter录制JMeter测试脚本
  • 原文地址:https://www.cnblogs.com/zhaorui/p/1719039.html
Copyright © 2011-2022 走看看