Factory Pattern

2016-10-04  本文已影响9人  ibyr

Intent
Define an interface for creating an object. But let subclasses decide which class to instantiate. Factory method lets a class defer instantiation to subclasses.

Abstract Factory Pattern

Intent
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.

上一篇 下一篇

猜你喜欢

热点阅读