Answer the question
In order to leave comments, you need to log in
How to understand factory class in factory method class??
I'm trying to figure out the factory pattern, but I can't really understand why the Factory is needed.
I'm looking at an example from this site . What is the point of the "ParserFactory" class, if you can just write the same thing in the method by getting rid of the class??
Answer the question
In order to leave comments, you need to log in
To make it easier to program later. Without understanding what is behind the interface. Everything is on the shelves, predictably structured and predictably behaves.
A long time ago I thought that OOP and patterns were generally only relevant "for large projects". When I stopped thinking like that, I started developing 5 times faster.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question