wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Confused about patterns? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Confused about patterns?" Watch "Confused about patterns?" New topic
Author

Confused about patterns?

Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi all,
I have been listening lot of buzz about patterns and this and that.. I also try reading online material for patters for J2SE , J2EE etc and I find myself still in trouble when it comes to implementing any of some of those patterns...
e.g. I understand Value Object, DAO etc and I have implemented them and it works in flexible way but I am still to figure out use of Factory, Singleton patterns and may be their combo in my implementations...
I tried to order a book "Design Patterns" from BookPool.com as it was cheaper there but I never recieved that book The reason I am still hesitant in buying it from amazon is- what I have observed is - "Patterns are quite logical". If we think little bit then we would have implementation that is some of the pattern without having "explicit" knowledge or awareness...though its good to know them...I used "Value object" even when I didnt know a word called "pattern" and after 2 years I realized "oh! that was Value Object" ...
in short I am still waiting for implementations that make me feel confident about use of Factory, Singleton and some other..I have never coded J2EE app so I don't know much about J2EE patterns...
Whenver I see examples, they seem correct but I find it hard to implement similar things when it comes to myself ...
any pointers for this mental illness?
Regards
Maulin
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
If you're order for Design Patterns was the GOF version, I would consider yourself lucky. Many would disagree with me. IMO, it's very hard to read. Worse yet if you don't know OMT or C++.
You are quite correct that you will often invent the patterns yourself. One of the great benefits of patterns is that they give you a common vocabulary with your peers. When you say Value Object people know what you're talking about very quickly. ( I'm supposing you are talking about the pattern that has since been renamed to transfer object. )
Other benefits is that you get to leverage proven designs. You might know ahead of time what the short comings are too.
One guy around here whose opinion I respect recommends Applied Java Patterns. I have Grand's first volume and the GOF work. I seldom consult my copy of the GOF's pattern book.
Howard Kushner
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 361
Hello Maulin,
I have studied Design Patterns many times. In fact we are getting ready to start it again in January in the Research Triangle Park (RTP) near Raleigh, North Carolina. We meet once a month in the Borders book store.
Each time you look at a pareticular pattern brings a new level of understanding. IMHO the best way to approach the book is to meet with some friends and pick a pattern and talk about it (i.e. what it means to you, how you have used it in the past, etc). You need to discuss with others to share ideas. That leads to deeper understanding. There are even study guides available on the Web to help you!
The 23 patterns themselves fit together in patterns. It is just amazing. If you want to know where idea behing the software engineering design patterns came from check out the work done by Christopher Alexander on architectural patterns. It will blow your mind.
[ December 01, 2003: Message edited by: Howard Kushner ]

Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1931182108/" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
Gavin Bong
Ranch Hand

Joined: Apr 25, 2003
Posts: 56
Howard,
How do you go about organizing a study group on design patterns ?
Is there "pattern" to the agenda that you follow during discussion ?
What text would you recommend using ?
Cheers,
Gavin
[ December 01, 2003: Message edited by: Gavin Bong ]
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi all,
Thanks for the responses.
Rufus, I know OMT and C++(little) and of course I am a java programmer for
couple of years (and that too with design as core criteria in mind always)
but its useful to know review from experienced like you about the book.
Howard, I agree with you but I have less friends in terms of these issues
with whom I get time to discuss things face-2-face and its hard for me to
communicate via these messages which can't speak So I get less exposure
in these respects. But I am sure given the willingness to learn, would get
me the friend list to meet just like you and for that I will have to put
strong efforts.
Gavin, as I mention I don't have access to personal meetings but if I guess
if you take a situation (each one of you may be) and think if any pattern
is applicable in any parts of your design and then try to explore the validity
and usefulness of each of those particular instances where you wanted to
apply patterns. Discuss "why" you chose a particular pattern? "how" would you
justify the use of a particular pattern?
Thanks again guys for useful input.
Regards
Maulin
Grub de Bliek
Greenhorn

Joined: Sep 09, 2003
Posts: 19
I think it's wrong to study the working of the design pattern itself, you should only study the situation it could be applied on.
Then, when you're developing you will sometimes run in situations difficult to solve. Then you will recognize those difficulties and think, "Hey! Doesn't the singleton solve this problem? How does a singleton work?"
And then you're gonna study the design pattern and implement it. This way you won't use much design patterns, but the number will grow when you get more experienced, and recognize more situations. Try to avoid to write your app around a design pattern, rather write your app and then refactor it with a design pattern.


When the compiler isn't happy, nobody is happy...
Howard Kushner
author
Ranch Hand

Joined: Sep 19, 2003
Posts: 361
Originally posted by Gavin Bong:
Howard,
How do you go about organizing a study group on design patterns ?
Is there "pattern" to the agenda that you follow during discussion ?
What text would you recommend using ?

I did a little surfing on Google using "Design Patterns" + study and this is the best link I could find right off the bat. Check it out and let me know what you think.
http://www.industriallogic.com/papers/learning.html
Regards,
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
A "Design Patterns Explained: A New Perspective on Object-Oriented Design" book by Alan Shalloway and James R. Trott which I recomment.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Howard Kushner:

I did a little surfing on Google using "Design Patterns" + study and this is the best link I could find right off the bat. Check it out and let me know what you think.
http://www.industriallogic.com/papers/learning.html

It's a very good link - in fact I would have recommended it if you didn't already provide it.
We just did our first study group meeting at work last week, and it was very productive


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confused about patterns?
 
Similar Threads
Purpose of hiding default constructor
Web Services Patterns:Question
patterns on the cattle drive
When to use Factory and when to use AbstractFactory ?
Design pattern is not for new guys?