Abstract Factory .Net IAnimalWorld interface
My question is in regards to the IAnimalWorld interface in DoFactory.GangOfFour.Abstract.NETOptimized which is part of the Design Pattern Framework 4.
Is this abstraction a part of the Abstract Factory Pattern?
At first it was confusing me because it did not seem to fit anywhere into the Abstract Pattern. It's only real use is from within MainApp, but even there the Clients are created as var, which are independent generic types, so IAnimalWorld is not used, unless I guess you were to put the two Clients (america, africa) into a IAnimalWorld collection of some sort.
Is there another specific use for this interface that I am missing? I understand its value, I just don't understand where in Abstract Factory it fits.
Mike Michaelis, Dec 10, 2010
yes, thank you for the answers. Just looking to clarify my understanding. I appreciate your help.
Mike Michaelis, Dec 12, 2010
AnimalWorld and IAnimalWorld are implementations of the ´Client´ in the original GOF description. So, the IAnimalWorld interface is our implementation of a client. There is no requirement that this must be an interface according to the Abstract Factory definition.
Hope this helps.
Dan McMillan, Dec 12, 2010