I guess you could think of the Abstract Factory Pattern as the Strategy Pattern applied to Factory Method... I don't have the GoF book at hand, though...
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
Wellcome to the Ranch ZhouCan. Please read our naming policy and change your displayed name accordingly. The goal of the Factory pattern is to isolate the creation of an intance from the code that is using that instance. The goal of Strategy is to be able to try several algorithms/policies to resolve a problem/situation. [ September 14, 2002: Message edited by: Jose Botella ]
Hi, If you think about it the Abstract factory is a structural pattern allowing different but related objects to be constructed - that's all. The strategy pattern is behavioural and all the objects created exhibit different behaviours (or strategies - hence the name) for dealing with the problem. Andy
subject: About Factory Pattern and Strategy Pattern.