Where should I not use factory pattern because everyone around me tells me not to instantiate concrete object.Factories are not easy to deal with when it comes to testing and I do not want to create factory for every possible object that I create.
On the top of all this confusion,why do I need to have singleton factory?
Where should I not use factory pattern because everyone around me tells me not
Share
You should program against interfaces, using factory patterns for everything is madness.
A singleton can be useful but again only if needed / wanted.
The main thing is not to use things you dont understand or dont see the point of, worth a read of Martin Fowlers book then think about it again and you might conclude a middle path is right for you.
In programming there is no right/wrong depends on many factors. Even using an interface for everything can be a pain but it has always paid of for me.