lundi 16 janvier 2017

prototype design pattern vs abstract factory design pattern

I have been reading some literature on design patterns when i stumbled upon the phrase : "there are cases when either Prototype or Abstract Factory could be used profitably" , from my understanding of these two patterns they are quite different, Prototype DP is used when you have a sample\prototype object which some attributes and as and when needed this object is cloned and given to the client, whereas Abstract Factory addresses the problem of making the code platform independent.

In this respect how can these two substitute each other at all as they are addressing different problems.

Aucun commentaire:

Enregistrer un commentaire