Monday, August 5, 2002 06:21 AM
Patterns are a tricky subject. If you only look at patterns as to how it is create, you will notice (like now) that many of the patters are similar. After all, almost every patterns start off with some type of interface or abstract class.
To effectively use the appropriate pattern means that you have to know the intent of what you are trying to do. In the case of Abstract factory vs. Factory method.
Abstract Factory is a tool kit; the usage is when you want to create related objects.
Factory method's purpose is for you to differ your instantiation of a subclass.
From the intent perspective, there is nothing similar about the two. I know this sounds just like another jargon from the GOF book, however, you must realize that using patterns is not something that will come to you overnight. If you read different books, work with people are more fluent in patterns, one day.. BAM! You will get it.