Home  /  Questions  /  Question



85   96.4
Dec 10, 2010


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.

Thanks.




830   99.9
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.


85   96.4
Dec 12, 2010
Hi Dan,
yes, thank you for the answers. Just looking to clarify my understanding. I appreciate your help.

-mike