dimanche 4 mars 2018

Difference between Command Pattern vs Simple Factory

I am reading the book on Head First Design Patterns, and am still trying to understand the clear difference between the Simple Factory and Command Pattern.

From what I see, they are the same - in the sense, they encapsulate the invocation of a method.

Is the only difference between the Simple Factory and Command in the sense that Simple Factory deals with object creation while Command pattern deals with behaviour?

So if the behaviour is about creating objects - isn't it the same?

(Please don't mark this as duplicate as I am trying to make things clear between these two!)

Aucun commentaire:

Enregistrer un commentaire