Reconstruction of the inevitability of a factorial container --- + + Limit test-driven development (XP) Programming

Reconstruction of some original side:

A, Extract Method principle 

        Responsibilities codes of different methods pulled out, creating a new approach

Two, Rename Method principle

       The two classes in the same way as a parent abstract class, changing the name to the same duties as function method, class methods to ensure consistency

Third, the introduction of design patterns

Test Driven Development

Xp: (logger)

First, demand from the start

      Simply log time

Second, changes in demand

    The need to expand the error log function algorithm performance log log

    Random combination of features: Decorator decorative patterns  

Released eight original articles · won praise 0 · views 10000 +

Guess you like

Origin blog.csdn.net/lzd649648959/article/details/7636325