Difference between factory pattern and Dependency Injection
can anybody explain indepth, difference between factory pattern and Dependency Injection
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Aug 20, 2012, 1:06 PM EDT
In a way, DI is an evolution of Factory Pattern.
The following post may make things clear:
http://codefornothing.wordpress.com/2007/11/11/why-use-dependency-injection/
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Aug 20, 2012, 1:57 PM EDT
So, in a way as said in the previous comment DI is highly evolved form of Factory pattern.