The Factory pattern allowed us to decouple our client from an object which it uses. The Abstract Factory pattern extends this idea to manage separate families of objects.
A runtime selection, or configuration option, in our client could decide which family of objects is to be used. The Abstract Factory pattern allows us to write generic code to instantiate and use the family objects regardless of which family is chosen at runtime. The pattern also helps us enforce a rule where objects from just the chosen family are used uniformly by the client.
View Complete Post