Composed Method and SLAP

阅读更多

 

     Composed Method mandates that all public methods read like an outline of the steps to perform. The actual steps are implemented as private methods. Composed method is a way of factoring your code to keep it cohesive and make it easier to spot candidates for code reuse. And TDD predisposes composed method.
 
     SLAP insists that all your code within a method live at the same level of abstraction. In other words, you shouldn’t have a method in which part of it deals with low-level database connectivity, another part with high-level business code, and another with web service plumbing.
                                                                                          -------- 

你可能感兴趣的:(TDD,Web,C,C++,C#)