The Artima Developer Community
Sponsored Link

Articles Forum
How to Use Design Patterns

9 replies on 1 page. Most recent reply: Mar 16, 2007 11:45 AM by hassan alhgamy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 9 replies on 1 page
Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

How to Use Design Patterns Posted: May 22, 2005 9:00 PM
Reply to this message Reply
Advertisement
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.html

How do you use design patterns in practice?


Joost de Vries

Posts: 19
Nickname: yoozd
Registered: May, 2003

Re: How to Use Design Patterns Posted: May 23, 2005 9:22 PM
Reply to this message Reply
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?

Mike Dunbar

Posts: 12
Nickname: mikedunbar
Registered: Jun, 2004

Re: How to Use Design Patterns Posted: May 24, 2005 7:29 AM
Reply to this message Reply
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.

Daniel Migowski

Posts: 1
Nickname: migo
Registered: May, 2005

Re: How to Use Design Patterns Posted: May 25, 2005 2:45 PM
Reply to this message Reply
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.

Douglas Bass

Posts: 3
Nickname: dwbass
Registered: Feb, 2004

Re: How to Use Design Patterns Posted: May 25, 2005 10:45 PM
Reply to this message Reply
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.

caojie

Posts: 1
Nickname: chargie
Registered: May, 2005

Re: How to Use Design Patterns Posted: May 28, 2005 6:13 AM
Reply to this message Reply
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".

Hari Vignesh Padmanaban

Posts: 2
Nickname: vignesh
Registered: May, 2005

Re: How to Use Design Patterns Posted: May 28, 2005 1:23 PM
Reply to this message Reply
"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

Joost de Vries

Posts: 19
Nickname: yoozd
Registered: May, 2003

Re: How to Use Design Patterns Posted: May 29, 2005 3:11 AM
Reply to this message Reply
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.

lxwde

Posts: 1
Nickname: lxwde
Registered: Jan, 2005

Re: How to Use Design Patterns Posted: May 31, 2005 12:14 AM
Reply to this message Reply
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.

hassan alhgamy

Posts: 2
Nickname: alhgamy
Registered: Mar, 2007

can any body help me? Posted: Mar 16, 2007 11:45 AM
Reply to this message Reply
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

Flat View: This topic has 9 replies on 1 page
Topic: A Framework for Swing Previous Topic   Next Topic Topic: The State of Swing

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use