Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Preparing for Design Patterns using GOF book?

 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've already gone thru HFDP's book. Now I'm going thru GOF book, it seems this book really is explaining patterns in detail and length and also to the point. Only problem I do see now is, the book is mentioning C++ code example, do you know of any site which provides the same code examples but in Java language?
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So far, I found out this site most nearest to GOF book code- http://www.oodesign.com/
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34686
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The concepts are the same. The exam isn't asking code level questions.
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:The concepts are the same. The exam isn't asking code level questions.


Agreed. So far I've crammed all the names of design patterns. To understand really what's the purpose/intent of design pattern, I'm going thru the examples and diagrams.
I'm unable to understand or the intents of DP's they don't really make sense to me unless I run thru the code.

Example-

Builder Pattern

Intent
Defines an instance for creating an object but letting subclasses decide which class to instantiate
Refers to the newly created object through a common interface

If you look above intent, this is pretty general statement, and it almost applies to all design patterns since almost all use abstract implementation.

In short I do see going thru diagrams only make me really understand the pattern otherwise it's all cramming business.

May you can put your insight forward, which I can use as a way to get the DP's in to my brain.


 
Jari Timonen
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer is closer than you think: Wikipedia, Design Patterns with links to patterns
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic