A commentary on creational patterns

Sometimes, some creational patterns overlap each other, while other times, they compliment each other. For example, an abstract factory is commonly implemented as a singleton pattern itself so as to have a single instance of the abstract factory object. Abstract factory can store the prototypes from which it can return the newly created cloned objects.
Abstract factories are often implemented as a number of factory methods (which is what I prefer as well) that promote creation through inheritance and give you dual flexibility with both abstract factory and factory method at the same time. Some abstract factories can also be implemented using the prototype pattern internally that promotes creation through delegation, as prototypes would be contained inside the abstract factory or otherwise implemented as singleton.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.216.7