What are the differences between Abstract Factory and Factory design patterns?

后端 未结 17 1149
醉话见心
醉话见心 2020-11-22 01:57

I know there are many posts out there about the differences between these two patterns, but there are a few things that I cannot find.

From what I have been reading,

17条回答
  •  情歌与酒
    2020-11-22 02:42

    Abstract Factory: A factory of factories; a factory that groups the individual but related/dependent factories together without specifying their concrete classes. Abstract Factory Example

    Factory: It provides a way to delegate the instantiation logic to child classes. Factory Pattern Example

提交回复
热议问题