Once you've objectively determined there's a problem in the code, you can use a handy refactoring pattern to improve it.
一旦客观地判断出代码中有问题,那么就可以用方便的重构模式改进它。
Long range, we should look for even more sophisticated tools, such as "pattern savvy" refactoring browsers that recognize USES (or potential USES) of design patterns in a program and apply them.
从长期来看,我们应寻找更卓越的工具,如“以模板为导向”的重整浏览器,它承认设计模板在程序中的使用(或潜在使用)并应用它们。
On the subject of using patterns wisely, you also might want to read Joshua Kerievsky's Refactoring to patterns, which says you should let your code tell you when to implement a pattern.
关于明智使用模式的这个主题,也可以阅读Joshua Kerievsky的Refactoring to Patterns,该书称可以让代码来告诉您何时实现模式。
应用推荐