• [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.

  • 相关阅读:
    使用最新最酷的安卓开发技术
    Android之ConnectivityManager
    Android -- ViewDragHelper
    android 管理手机短信
    内存管理[6]测试堆的内存占用情况
    内存管理[5]通过 GetProcessHeaps 函数获取了当前进程的堆句柄列表
    内存管理[4]一个使用私有堆的例子
    内存管理[3]堆
    内存管理[2]
    内存管理[1]
  • 原文地址:https://www.cnblogs.com/zhaorui/p/1719039.html
Copyright © 2020-2023  润新知