refectoring - improve the exiting code

indirection and refectoring

1,enable sharing of logic

2,to explain intention and implemetation separately

3,to isolate change

4,to encode conditional logic

the rule is so cool and so useful

猜你喜欢

转载自fawen.iteye.com/blog/1769230