Skip to main content

Posts

Showing posts with the label abstract factory

Creational Patterns : Abstract Factory

Properties: -            Similar to simple factory. However there are multiple factory classes which shares a common abstract factory class and each of them is responsible for creating a different family of XYZ classes. XYZ here means a factory product. XYZ1 and XYZ2 are different products. -            Actual factory implementation is chosen like the way factory class itself choses its XYZ implementation. In this manner Abstract Factory Pattern can be regarded as Factory for Factory Classes. -            Identified by  an abstract factory (interface as well) class  defining root of factory hieracrchy   and  multiple factory implementations. Implementation: -            An abstract factory class defines root for Factory hierarchy. -   ...