Enterprise Application Architecture with .NET Core
by Ganesan Senthilvel, Ovais Mehboob Ahmed Khan, Habib Qureshi
Abstract factory pattern
Abstract factory gives you the ability to create a number of related classes. It provides an interface that encapsulates the capability to create a group of classes that are related in some way.
You are already aware of the factory method pattern. In other words, an abstract factory is an interface that groups together related factory methods.
For example, KTM bikes creates various types of bikes using a number of various factory methods, whereas the abstract factory for KTM brings all these factory methods together and gives you a generic interface so that you can similarly implement an Aprilia bikes abstract factory, and so on.
Let's take a look at the following UML diagram for the abstract factory pattern for our ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access