Dependency Injection And Ioc Containers
- 11. Better….… but still a lot of workThere are so many dependencies in this system, how do I manage them all?
- 12. Dependency InjectionWith a Factory PatternEntity“I need to be created, including have all my services crated and given to me.”Object Factory “ I know how to build all of this stuff.”Create aConcrete instanceCreate anEntity for meInstance forapplicationApplication“I need an Entity, but I don’t know how to create it.”
- 13. I want to spend my day writing functional business code, NOT a bunch of plumbing code…
- 18. Etc..Application“I need a concrete instance of an Entity…”Provider“You tell me what type of object you want, I give you the object you need:”Container“You ask me for objects, I create them based on my registrations”
- 21. Some helpful links…Martin Fowler martinfowler.com/articles/injection.htmlMSDN Article on Dependency Injection patternhttp://tinyurl.com/bm8wm5Dependancey Injection tutorialhttp://tinyurl.com/5fysrq
- 22. Some helpful links…DI/IOC Frameworks:Ninject.orgStructureMap.Sourceforge.netwww.castleproject.org/container/index.htmlUnity (tinyurl.com/cm9pe3)