Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GOF vs Head First Design Patterns

 
Nikhil Jain
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which is the better of the two? I find GOF too hard to understand & the given examples are more mathematical.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Head First Design Patterns does not contain all of the GOF patterns. GOF is not that hard to follow, if you take one pattern at a time, and try to code the patterns according to the class diagrams.
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found Head First Design Patterns much easier to read than GOF.
 
raj sirohi
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nikhil,
I didnt read GOF at all, I dropped it after 3 chapter, HFDP is far better , here is the link to my post

http://www.coderanch.com/t/485305/java-Architect-SCEA/certification/Cleared-SCEA-Part

thanks
Raj
 
Mika Tapanainen
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I didn't read both of the books and I passed (but score was 65%). I read for the exam about the patterns only the Cade's and Sheil's book and the Java Camp design patterns pages

BR,

Mika
 
Mihai Lihatchi
Ranch Hand
Posts: 138
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not remember very well right now because I read HFDP in 2007 (and it belonged to a friend) but I think the book was designed as a Java equivalent of Gang of Four .

However I still think that even though GoF is old and addresses a C/C++ audience it is still worth a look because it is a classic. Some concepts never get old and however brilliant the Head First authors are (and I mean it they are ) they are still basing the book on GoF ( I remember this from the introduction ).


Regarding SCEA preparation : I used both GoF and HFDP in my preparation but also my experience as a Java developer. Patterns are nothing more than recurring solutions to problems so your experience should help as well. Even during assignment you should question whether you need to use a pattern or not .. don't try to stuff a pattern in the solution unless you are sure it brings value to your design.
I passed the beta so .. don't take my words for granted regarding the actual SCEA exam
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFDP leans on the seminal work of the GOF.

In their book the GOF say:

"The choice of programming language is important because it influences
one's point of view. Our patterns assume Smalltalk/C++-level language features,
and that choice determines what can and cannot be implemented easily. If we
assumed procedural languages, we might have included design patterns called
'Inheritance,' 'Encapsulation,' and 'Polymorphism.'"


My language of choice is Java which is one of the reasons why I preferred HFDP.
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm reading both. I use GOF for a more general view over de concepts with I could use for different other languages and as a way of thinking and concepts for different problems and using Design Patterns for a more practical approach.
 
Kuppusamy Venkatasubramanian
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I too started GOF but couldn't continue as it is too conceptual to understand. I read HeadFirst twice. HeadFirst rocks and makes the patterns stick with great examples. It makes you to correlate the examples with pattern if you don't get the pattern in the first place. I witnessed this especially with Decorator pattern.

Cheers,
Kuppusamy.V.,

 
Heilien Tsui
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find that the code sample from wikipedia for Design Pattern (from GOF) is easier to understand. maybe for a good start to learn the Design Patterns
 
Rajiv Shr
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wikipedia all the way

http://en.wikipedia.org/wiki/Design_Patterns
 
albert smith
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GOF Design Patterns are the original one and they appeared in mid 90's. They are great and they were written with c++ and smalltalk in mind. Since then people used the design patterns in practice instead of theory and they noticed some of them are useless or have better alternatives and some are easier to implement in modern languages(like java) due to new features like reflection. Some patterns are limited because some features are not provided in modern languages(multiple inheritance). Of course the term of design patterns was enlarged to new categories like enterprise patterns,....

Personally, I find HeadFirst patterns easier to understand than the original GOF patterns.
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11945
212
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
albert smith wrote:Since then people used the design patterns in practice instead of theory and they noticed some of them are useless or have better alternatives

I have a bit of a problem with that specific sentence...

In my experience, people who have been developing for some time tend to pick up a design patterns book (GOF or other book) and say something like "so that's the name of what I've been doing all this time".

The GOF book, and those that came after it, did not invent the patterns in an ivory tower. These were patterns that were seen time and time again in real code.

Where people had a problem is when they came from a theoretical background and tried to apply a specific pattern to a particular problem, and found that they created more problems for themselves than they solved. This is typically described as "I have a hammer, so everything looks like a nail". I also have an image in my mind of a child's TV show where the host of the show is saying (in their usual bright, bubbly way): hey kids, today we are going to implement the factory pattern - yay!!!
 
P Das
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My twopence: please do not neglect GoF.

If you have difficulty, start with some pattern like Singleton.

There is no hard and fast rule that you have to follow in the order the book follows (at least not all cases).

You may find interest after you saw some of the crisp definitions of GoF work with you.

Happy reading!
 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nikhil Jain wrote:Which is the better of the two? I find GOF too hard to understand & the given examples are more mathematical.

If you are just a developer and dont' need to know Design Patterns inside out, then you might be ok with Head First. Otherwise I'd avoid it and go with GoF. You'd want to have a very good understanding of GoF before attempting this exam.

 
Chrix Wu
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the head first book, it says, "read this, then you are well prepared to read the GOF book".

my opinion, head first book, first, then read GOF if you got time
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic