mercredi 17 juin 2020

Abstract Factory VS Factory Method

I recently read abstract factory and factory method design patterns. Actually it is said that abstract factory is used for creating a family of related products which have to be consistent. My question is that is it enough for creating a new design pattern and name it "abstract factory" which is just the extended version of factory method? actually i want to say that abstract factory is factory method and abstract factory can be implemented with factory method . So why a new design pattern has been created and named "Abstract factory". let me make it clearer. what is the essential difference between them except that one of them is used for creating a family of related things (this can not be a difference , because this can be done with factory method)? I appreciate you in advance.

Aucun commentaire:

Enregistrer un commentaire