Your SlideShare is downloading. ×
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Dependency Inversion Principle
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Dependency Inversion Principle

1,109

Published on

Covering DI, the D of SOLID. IOC tools, TDD and a bit of best practice

Covering DI, the D of SOLID. IOC tools, TDD and a bit of best practice

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,109
On Slideshare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. http://lifetuned.com http://pikpak.me Dependency Inversion@tommysqueak http://tomphilip.me
  • 2. About• Dependency Injection• Service Location• TDD & Mocking - How they play together nicely• Auto-mocking• IOC - Tools, Features, Usage, Pros/Cons, Best Practice
  • 3. Definition• High-level modules should not depend on low-level modules. Both should depend on abstractions.• Abstractions should not depend upon details. Details should depend upon abstractions.
  • 4. Design PatternsDependency Injection Service Locator
  • 5. StoryAs a CustomerI want to change my passwordIn order to keep my account secureScenarioGiven I’m an account holderWhen I change my passwordThen It should ensure it is a strong passwordAnd it should change my passwordAnd it should notify me it has been changed
  • 6. Demo
  • 7. Benefits• Loose coupling• Re-use• Testability
  • 8. Inversion of Control
  • 9. ProvideDependency Injection Service Locator
  • 10. Usage• Registration• Entry Point
  • 11. Demo
  • 12. Frameworks•AutoFac• NInject• Castle Windsor• StructureMap• Unity
  • 13. How They Look
  • 14. A Little Best Practice• Internal code should not reference the container directly• Verify registration with tests• Constructor Injection over Setter Injection over Service Location
  • 15. Picture Credits• http://www.flickr.com/ • http://www.flickr.com/ photos/smil/4196304056/ - photos/gcwest/ Patterns 281385801/ - containers• http://lostechies.com/ derickbailey/2009/02/11/ solid-development- principles-in-motivational- pictures/ - SOLID pictures• http://www.flickr.com/ photos/kevindean/ 4031083510/ - trolley

×