Simple Factory and Factory Method pattern
The Simple Factory pattern is similar to Extract Method refactor rule -- one method deal with the same (creation) logic.
The Fatory Method pattern is similar to polymorphism--A create method implemented by multiple classes.
The secret of pattern is that: some one reinvent the same way to solve
an old problem and give it a fancy name.
The Fatory Method pattern is similar to polymorphism--A create method implemented by multiple classes.
The secret of pattern is that: some one reinvent the same way to solve
an old problem and give it a fancy name.