I'll assume by factory you mean Factory Method. A Factory Method can return different concrete types based on any kind of internal logic. I use them to get the proper strategy based on a product type:
That will give me some variety of pricing strategy for a toaster. I might get a different one for a blender. PricingStrategy is probably an interface here.
Abstract factory gets you a whole factory again based on some logic. The factory creates a family of related things. Different factory implementations give you different families. They might use more Factory Methods or just plain creator methods.
I think these patterns are poorly named and fussy in their definitions. I might even have gotten some of the details wrong because I don't strive to adhere to them perfectly. Ilja will let us know.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Jun 29, 2006
Thanks guys for clarifying this.
I really appreciate it.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com