What is the difference between Factory Pattern and Dependency Injection? And when does one use the Factory Pattern over Dependency Injection?
If I write custom xml in my config file and then in my custom factory.cs file I create an interface object with reflection or getsection() from xml. Next, I return an interface to the client like Service Locator Pattern does this then become the Dependency Injection?
I am very confused and need some examples and/or a roadmap.