Timeline for Factory Method vs. Factory Method design pattern
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 21, 2014 at 19:59 | vote | accept | Aviv Cohn | ||
| Mar 21, 2014 at 16:32 | answer | added | DougM | timeline score: 0 | |
| Mar 21, 2014 at 16:01 | answer | added | Tulains Córdova | timeline score: 5 | |
| Mar 21, 2014 at 12:48 | comment | added | pdr | @Prog: Yes. I would add that the Factory Method pattern is very specifically a method that selects which concrete implementation of a common supertype to return based on whatever information you give it. That's an important distinction from simply "a method that creates an object and returns it", which could easily include a constructor or the build part of the Builder pattern, neither of which are a Factory Method. | |
| Mar 21, 2014 at 11:47 | comment | added | Aviv Cohn | @pdr I read the answer you linked to. Does that mean that the Factory Method design pattern is simply a method that creates an object and returns it - and thw Abstract Factory is a pattern that has a common interface for different factory classes - each class with a number of factory methods? | |
| Mar 21, 2014 at 11:45 | comment | added | Uri Agassi | @Prog - where does it say that a pattern should be anything more than a method? You could also look at this SO question for a very elaborate answer on the subject: stackoverflow.com/questions/4209791/… | |
| Mar 21, 2014 at 11:44 | comment | added | yannis | Check the link in @pdr's comment, it explains the Factory Method and Abstract Factory patterns beautifully. | |
| Mar 21, 2014 at 11:33 | comment | added | Aviv Cohn | @pdr What I called a Factory Method is a method. How can one method be a pattern? | |
| Mar 21, 2014 at 11:30 | comment | added | pdr | What you are calling the "Factory Method design pattern" sounds more like an Abstract Factory pattern to me. What you're calling the Factory Method IS the design pattern. See programmers.stackexchange.com/questions/81838/… | |
| Mar 21, 2014 at 11:08 | history | asked | Aviv Cohn | CC BY-SA 3.0 |