I know there are a lot of questions out there about differences of different factory patterns, but the answers are so different and confusing. The books that i read use uncl
Here is a simple guideline I can think of following -
The basic differentiation between these two is one provides a concrete creator (Simple Factory) while the other(Factory method) supports decoupling of creator by inheritence so that multiple creators can be supported. An example to make it clearer -
Button with different types - Toggle, ImageButton etc. Its more likely that you would have different creators of Button. For eg. based on different operating systems, WindowsButtonFactory, OSXButtonFactory etc. Factory method is suitable in this case with an abstract class ButtonFactory being implemented by WindowsButtonFactory, OSXButtonFactory (and many more in future).Book based on genre - Fiction, NonFiction etc. More than often you would think a concrete Factory should be enough here.