With wider set of available options in the market,
applications have to support various protocols at a specific moment in time. It
becomes tedious to integrate all such vendors at one go. So to reduce the
responsibility of the developer it is mandatory to share the burden with
different vendors.
Abstraction has been worked wonderfully for developers and
companies in the past. In this pattern too abstraction is the base.
Here, application designates the responsibility of object
creation with vendor. Vendor has to write factory to instantiate the object
whereas application only uses the reference of the interface.
Pic taken from http://howtodoinjava.com/2012/10/29/abstract-factory-pattern-in-java/ |
As it is evident application has provided default factory, but there are other factories which are defined based on the region i.e. Asia, and US. It can be further divided into different segments i.e. country or class or car.
Advantage of this pattern is the delegating the creation of object on individual vendor.