Summary:
Among developers, design patterns are a popular way to think about design, but what is the proper way to think about design patterns? In this interview, Erich Gamma, co-author of the landmark book,
Design Patterns, talks with Bill Venners about the right way to think about and use design patterns.
The ability to add new comments in this discussion is temporarily disabled.
Most recent reply: March 16, 2007 10:45 AM by
hassan
|
Among developers, design patterns are popular way to think about design, but what is the proper way to think about design patterns? In this interview, Erich Gamma, co-author of the landmark book, Design Patterns, talks with Bill Venners about the right way to think about and use design patterns. Read this Artima interview with Erich Gamma: http://www.artima.com/lejava/articles/gammadp.htmlHow do you use design patterns in practice?
|
|
|
I'm surprised that the Design Patterns by GoF are still considered, by the head-first book for instance, to be the only design patterns. Is the GoF book complete?
|
|
|
Good to see another interview here, seems like it's been so long and I really miss them!
Really appreciate the questions and response around the real value of patterns, and how to use them.
Erich Gamma: I think patterns as a whole can help people learn object-oriented thinking: how you can leverage polymorphism, design for composition, delegation, balance responsibilities, and provide pluggable behavior...
Very important aspect of patterns. My personal observation is that OO is still, by and large, poorly understood and implemented. So many projects lack basic ingredients like abstraction and separation of concerns, resulting in tangled messes that are a nightmare to maintain.
The emphasis on pragmatic use of patterns was very good to hear, especially from one of the original gang:
Erich Gamma: ..Do not start immediately throwing patterns into a design, but use them as you go and understand more of the problem....I saw in a news group someone claiming that in a particular program they tried to use all 23 GoF patterns...
This sort of pattern abuse has turned off many people from patterns altogether, which is very unfortunate. Even if a small percentage of patterns is actually needed on a given project, you still need to understand them, so you know when to use them:
Erich Gamma: ...Patterns are distilled from the experiences of experts. They enable you to repeat a successful design done by someone else. By doing so you can stand on the shoulders of the experts and do not have to re-invent the wheel...People should learn that when they have a particular kind of problem or code smell, as people call it these days, they can go to their patterns toolbox to find a solution. ... A lot of the patterns are about extensibility and reusability. When you really need extensibility, then patterns provide you with a way to achieve it and this is cool. But when you don't need it, you should keep your design simple and not add unnecessary levels of indirection. One of our Eclipse mottos is that we want extensibility where it matters.
Look forward to the remaining installments of this interview.
|
|
|
To Joost de Vries:
There are many more patterns, have a look at the book about Java Enterprise Patterns, and of course, not all pattern are published by the GoF. Most other sets of patterns that I saw, are developed for niche-programming, btw.
|
|
|
In the time since GoF was published, there has been an explosion of design patterns, and a number of books organizing them into categories. Martin Fowler has mentioned that there are patterns for particular contexts. His enterprise patterns book, for example, could be thought of as the enterprise version of GoF, but it has nothing to do with software patterns for cell phones, PDA's etc.
When people started cooking with a new food, various kinds of pain was experienced, and a number of recipes emerged as solving the pain. It seems to help to consider a design pattern as a successful recipe.
|
|
|
We are having the "software design" course in which we are taught about the patterns with the textbook of "Head First to Design Patterns".
Having learnt some patterns as Strategy, Observer, Decorator and others, and having finished an assignment which require us to design a command runner, I think the value of patterns is not only teaching us how to convert them into codes, but also and more important and essential expanding our view and thought when we try to solve some real problems.
As for the use of design patterns, I hold the opinion as " more practice more expirenced".
|
|
|
"Head First Design Patterns" rocks !!
Its a very good book especially for beginers and evn for people who are not quite affluent with all the patterns :)
But as one person mentioned, the more experience you have the more better are your chances of understanding and applying these patterns
hari
|
|
|
Hi Daniel & Douglas,
Thanks for your response. I'm aware of the Patterns of Enterprise Architecture book, and of the PoSA books. It's just that PoEA represents patterns of a different, larger, granularity. The fun part of design patterns is that they are very low level, almost language level, and can be applied in any kind of application. What I meant to say is that I'm surprised that every pattern-teaching book, like the head-first book, seems to rely on the set of patterns as stated in the GoF book. I'd be interested in new low-level design patterns. But maybe that well is empty.
|
|
|
hi,Bill
i'm thinking of translating this conversation into chinese and put it on my blog(of course none commercial use), but i don't know whether this will violate the copyright of Artima.
|
|
|
i have one quetion . how make program by c do summition first five prime of numbers by call function to do that via recursion. pleas help me i`m student if any body solve this can send the soultion to my Emil:nemses2004@yahoo.com
|
|