[Study Note] Design and Testability 20100411

[Succeed with TDD by designing with TDD]

I don;t care how good you think your design is. If I can’t walk in and write a test for an arbitrary method of yours in five minutes its not as good as you think it is, and whether you know it or not, you’re paying a price for it. – Michael Feathers, The Bar is Higher Now, 2004

Antipattern

TheBlob antipattern

Such systems usually have a few classes (Blobs) that have hundreds of methods and variables and encapsulate all the logic that the entire program needs. The rest of the system is littered with many dumb objects.

  1. BaseBlob – involves a base class that is a blob and hundreds of subclasses with little content.
  2. BlogController – found in systems with many, interrelated objects. all such objects are dumbed down and the BlobController does everything.

Stovepipe antipattern

a stovepipe system is a system procured and developed to solved a specific problem, characterized by a limited focus and functionality, and containing data tha cannot be easily shared with other systems.

  1. AutogeneratedStovepipeAntiPattern refers to porting an existing system to a distributed system, without adjusting the design to account for the distributed nature.
  2. StovepipeEnterpriseAntiPattern refers to “islands of automation” within an enterprise that are designed independently with little commonality or interoperability.
  3. StovepipeSystemAntiPattern refers to similar architecture between the subsystems of a single system.

posted on 2010-04-12 01:05  zhaorui  阅读(159)  评论(0编辑  收藏  举报

导航