The Design Pattern Religion from Uncle Bob

Interesting post from Uncle Bob. So I share again.

http://blog.objectmentor.com/articles/2009/10/06/echoes-from-the-st...

The Design Patterns religion is a foul bird that ravages teams and cuts down young projects in their prime. But let’s be clear about what that religion is. The Design Patterns religion is the ardent belief that the use of design patterns is good.

Here’s a clue. Design Patterns aren’t good. They also aren’t bad. They just are. Given a particular software design situation, there may be a pattern that fits and is beneficial. There may also be patterns that would be detrimental. It’s quite possible that none of the currently documented patterns are appropriate and that you should close the book and just solve the problem.

Here’s another clue. You don’t use patterns. You don’t apply patterns. Patterns just are. If a particular pattern is appropriate to solve a given problem, then it will be obvious. Indeed it is often so obvious that you don’t realize that the pattern is in place until you are done. You look back at your code and realize: “Oh, that’s a Decorator!”.

So am I saying that Design Patterns are useless?

NO! I want you to read the patterns books. I want you to know those patterns inside and out. If I point at you and say “Visitor” I want you at the board drawing all the different variants of the pattern without hesitation. I want you to get all the names and roles right. I want you to know patterns.

But I don’t want you to use patterns. I don’t want you to believe in patterns. I don’t want you to make patterns into a religion. Rather I want you to be able to recognize them when they appear, and to regularize them in your code so that others can recognize them too.

Design Patterns have a huge benefit. They have names. If you are reading code, and you see the word “Composite”, and if the author took care to regularize the code to the accepted names and roles of the “Composite” pattern, then you will know what that part of the code is doing instantly. And that is powerful!

-------------------------------------

I like his message. His message is clear.

Views: 10

Comment

You need to be a member of MyanmarITPro - A Social Network for Myanmar IT Professionals to add comments!

Join MyanmarITPro - A Social Network for Myanmar IT Professionals

Comment by Myint Kyaw Thu on March 8, 2010 at 1:39pm
Totally agreed with it!!!
But I don’t want you to use patterns. I don’t want you to believe in patterns. I don’t want you to make patterns into a religion. Rather I want you to be able to recognize them when they appear, and to regularize them in your code so that others can recognize them too.

Latest Activity

Nay Lin Kyaw replied to ဟိန္းထက္'s discussion ကူညီပါ.........။
46 minutes ago
GaaRa posted a discussion
1 hour ago
Okisan and Kyaw Thu are now friends
2 hours ago
Phyu Sin Kyaw replied to Aung Than U's discussion Search Engine မွာရွာရင္ ကၽႊန္ေတာ္တို႔ ကုမၼဏီရဲ႕ ၀က္ဆိုဒ္ကို အေပၚဆံုးမွာ ျမင္ခ်င္လို႔ပါ... Asp.net နဲ႔ ေရးထားတဲ႔ ဆိုဒ္ပါ..သိရင္ ေျပာျပေပးၾကပါ senior မ်ားခင္ဗ်ာ.....
2 hours ago
Jake added a discussion to the group Networking
2 hours ago
Phyu Sin Kyaw replied to Wayne's discussion [ Moved ] Skype Credit Sale
3 hours ago
D0743M0N replied to D0743M0N's discussion What is the best way to decide limitation of broadcast level in the group Networking
3 hours ago
DaKyat replied to D0743M0N's discussion What is the best way to decide limitation of broadcast level in the group Networking
3 hours ago
D0743M0N replied to D0743M0N's discussion What is the best way to decide limitation of broadcast level in the group Networking
3 hours ago
Min Lwin posted a status
"for B Shell beginners. http://ning.it/M8TDWR"
8 hours ago
yenaungkyaw updated their profile
8 hours ago
yenaungkyaw liked ဟိန္းထက္ေအာင္'s blog post Window 8 and Window7/8 Phone
8 hours ago
Ko Nge commented on Ko Nge's blog post ေဖ့ဘြတ္ထဲက ၀င္ေငြရွာနည္း (၁၂)မ်ိဳး
10 hours ago
Ko Nge updated their profile
10 hours ago
John Moe replied to D0743M0N's discussion What is the best way to decide limitation of broadcast level in the group Networking
13 hours ago
Win Min Tun left a comment for Ko Nge
16 hours ago

© 2012   Created by Ko Chit.

Badges  |  Report an Issue  |  Terms of Service