设计模式及其用途的最佳资源是什么?
当使用设计模式时,我猜想有三种类型的商店。那些谁不会知道一个模式,如果它打了他们的脸 - 这些通常喜欢Ctrl-C / Ctrl-V方法进行代码重用。那些每天花上几个小时寻找他们的遗留代码的人希望实现一个更伟大的模式 - 这些通常花费更多的时间重构简单程序的代码,而不是在一百年的维护中花费的时间。最后,那些在中间路径使用模式的人,当他们有意义的时候,使用模式,并编码任何先于最低限度暴露的代码。
When it comes to the use of design patterns, I am guessing there are three types of shops. Those who wouldn't know a pattern if it hit them in the face - these usually prefer the Ctrl-C / Ctrl-V approach to code-reuse. Those who spend hours a day searching their legacy code in hopes of implementing one more great pattern - these usually spend more time refactoring the code of simple programs than would ever be spent in a hundred years of maintenance. And finally, those who walk the middle path using patterns when they make sense, and coding whatever comes first for minimally exposed code.
我想知道是否有人锁定在软件开发生命周期中平衡使用模式的良好方法。而且,网络上最好的资源是什么样的模式,他们的激励因素和正确使用?
I'm wondering if anyone has locked down a good approach to a balanced incorporation of pattern use in the software development life cycle. Also, what is the best resource on the Web for patterns, their motivating factors, and their proper use?
谢谢。
有很多不同的'模式'家庭在那里,但把你的问题的最广泛的条款...
There are lots of different 'pattern' families out there, but taking your question its broadest terms...
我建议:
- Jim Coplien's Organisational Patterns
- The Hillside Group wiki
- Kevlin Henney's site has plenty of excellent links & papers
离线(我的最爱):
- Fowler's Patterns of Enterprise Architecture
- Feather's Working Effectively with Legacy Code
离线(流行):
- GoF设计模式
- Fowler的重构:改进现有代码的设计