SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
http://lifetuned.com
                      http://pikpak.me




               Dependency
                 Inversion

@tommysqueak       http://tomphilip.me
About
•   Dependency Injection
•   Service Location
•   TDD & Mocking - How they play together nicely
•   Auto-mocking
•   IOC - Tools, Features, Usage, Pros/Cons, Best
    Practice
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.
Design Patterns
Dependency Injection

  Service Locator
Story
As a Customer
I want to change my password
In order to keep my account secure
Scenario
Given I’m an account holder
When I change my password
Then It should ensure it is a strong password
And it should change my password
And it should notify me it has been changed
Demo
Benefits
•   Loose coupling
•   Re-use
•   Testability
Inversion of Control
Provide
Dependency Injection

  Service Locator
Usage
•   Registration
•   Entry Point
Demo
Frameworks
•AutoFac
• NInject
• Castle Windsor
• StructureMap
• Unity
How They Look
A Little Best Practice
•   Internal code should not reference
    the container directly
•   Verify registration with tests
• Constructor Injection over Setter
    Injection over Service Location
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

Weitere ähnliche Inhalte

Andere mochten auch

Business Model Generation: Business Model Canvas + Design Thinking
Business Model Generation: Business Model Canvas + Design ThinkingBusiness Model Generation: Business Model Canvas + Design Thinking
Business Model Generation: Business Model Canvas + Design ThinkingSiddhant Choudhary
 
Overview of Business Model Canvas Tools
Overview of Business Model Canvas ToolsOverview of Business Model Canvas Tools
Overview of Business Model Canvas ToolsChristoph Plamper
 
Innovation & Business Model & Business Model Canvas 2014
Innovation & Business Model & Business Model Canvas 2014Innovation & Business Model & Business Model Canvas 2014
Innovation & Business Model & Business Model Canvas 2014Serdar Temiz
 
20150216 design thinking dans l'éducation
20150216 design thinking dans l'éducation20150216 design thinking dans l'éducation
20150216 design thinking dans l'éducationSerge Van Oudenhove
 
Business Model Canvas (Dr. Htet Zan Linn)
Business Model Canvas (Dr. Htet Zan Linn)Business Model Canvas (Dr. Htet Zan Linn)
Business Model Canvas (Dr. Htet Zan Linn)Htet Zan Linn
 
Overview of business model canvas tools
Overview of business model canvas toolsOverview of business model canvas tools
Overview of business model canvas toolsChristoph Plamper
 
Business Model Canvas Poster Deutsch V 1.1
Business Model Canvas Poster Deutsch V 1.1Business Model Canvas Poster Deutsch V 1.1
Business Model Canvas Poster Deutsch V 1.1Thorsten Faltings
 
Leading and Managing Change [Change Management]
Leading and Managing Change [Change Management]Leading and Managing Change [Change Management]
Leading and Managing Change [Change Management]Siddhant Choudhary
 
(Pre) Accelerate towards the future!
(Pre) Accelerate towards the future!(Pre) Accelerate towards the future!
(Pre) Accelerate towards the future!Startup Pirates
 
Design Thinking and the Business Model Canvas for the Mobile Economy
Design Thinking and the Business Model Canvas for the Mobile EconomyDesign Thinking and the Business Model Canvas for the Mobile Economy
Design Thinking and the Business Model Canvas for the Mobile EconomySerge Van Oudenhove
 
Business model Canvas
Business model CanvasBusiness model Canvas
Business model CanvasIbrahim Faza
 
How To Design A Good A P I And Why It Matters G O O G L E
How To Design A Good  A P I And Why It Matters    G O O G L EHow To Design A Good  A P I And Why It Matters    G O O G L E
How To Design A Good A P I And Why It Matters G O O G L Eguestbe92f4
 
OOP Principles
OOP PrinciplesOOP Principles
OOP PrinciplesDahyun Kim
 
Business Model Canvas
Business Model CanvasBusiness Model Canvas
Business Model CanvasTom Philip
 
Business Model Canvas
Business Model CanvasBusiness Model Canvas
Business Model Canvassvanebjerg
 
Business Model Websites Canvas Poster- format Checkliste
Business Model Websites Canvas Poster- format ChecklisteBusiness Model Websites Canvas Poster- format Checkliste
Business Model Websites Canvas Poster- format ChecklisteThorsten Faltings
 

Andere mochten auch (16)

Business Model Generation: Business Model Canvas + Design Thinking
Business Model Generation: Business Model Canvas + Design ThinkingBusiness Model Generation: Business Model Canvas + Design Thinking
Business Model Generation: Business Model Canvas + Design Thinking
 
Overview of Business Model Canvas Tools
Overview of Business Model Canvas ToolsOverview of Business Model Canvas Tools
Overview of Business Model Canvas Tools
 
Innovation & Business Model & Business Model Canvas 2014
Innovation & Business Model & Business Model Canvas 2014Innovation & Business Model & Business Model Canvas 2014
Innovation & Business Model & Business Model Canvas 2014
 
20150216 design thinking dans l'éducation
20150216 design thinking dans l'éducation20150216 design thinking dans l'éducation
20150216 design thinking dans l'éducation
 
Business Model Canvas (Dr. Htet Zan Linn)
Business Model Canvas (Dr. Htet Zan Linn)Business Model Canvas (Dr. Htet Zan Linn)
Business Model Canvas (Dr. Htet Zan Linn)
 
Overview of business model canvas tools
Overview of business model canvas toolsOverview of business model canvas tools
Overview of business model canvas tools
 
Business Model Canvas Poster Deutsch V 1.1
Business Model Canvas Poster Deutsch V 1.1Business Model Canvas Poster Deutsch V 1.1
Business Model Canvas Poster Deutsch V 1.1
 
Leading and Managing Change [Change Management]
Leading and Managing Change [Change Management]Leading and Managing Change [Change Management]
Leading and Managing Change [Change Management]
 
(Pre) Accelerate towards the future!
(Pre) Accelerate towards the future!(Pre) Accelerate towards the future!
(Pre) Accelerate towards the future!
 
Design Thinking and the Business Model Canvas for the Mobile Economy
Design Thinking and the Business Model Canvas for the Mobile EconomyDesign Thinking and the Business Model Canvas for the Mobile Economy
Design Thinking and the Business Model Canvas for the Mobile Economy
 
Business model Canvas
Business model CanvasBusiness model Canvas
Business model Canvas
 
How To Design A Good A P I And Why It Matters G O O G L E
How To Design A Good  A P I And Why It Matters    G O O G L EHow To Design A Good  A P I And Why It Matters    G O O G L E
How To Design A Good A P I And Why It Matters G O O G L E
 
OOP Principles
OOP PrinciplesOOP Principles
OOP Principles
 
Business Model Canvas
Business Model CanvasBusiness Model Canvas
Business Model Canvas
 
Business Model Canvas
Business Model CanvasBusiness Model Canvas
Business Model Canvas
 
Business Model Websites Canvas Poster- format Checkliste
Business Model Websites Canvas Poster- format ChecklisteBusiness Model Websites Canvas Poster- format Checkliste
Business Model Websites Canvas Poster- format Checkliste
 

Ähnlich wie Dependency Inversion Principle

20181025 integration reloaded_integration_solutions_based_on_reactive_principles
20181025 integration reloaded_integration_solutions_based_on_reactive_principles20181025 integration reloaded_integration_solutions_based_on_reactive_principles
20181025 integration reloaded_integration_solutions_based_on_reactive_principlesOPITZ CONSULTING Deutschland
 
Integration Reloaded - Integration solutions based on reactive principles
Integration Reloaded - Integration solutions based on reactive principlesIntegration Reloaded - Integration solutions based on reactive principles
Integration Reloaded - Integration solutions based on reactive principlesSven Bernhardt
 
Governance and Security Solution Patterns
Governance and Security Solution Patterns Governance and Security Solution Patterns
Governance and Security Solution Patterns WSO2
 
SQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionSQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionLearnNowOnline
 
8 cloud design patterns you ought to know - Update Conference 2018
8 cloud design patterns you ought to know - Update Conference 20188 cloud design patterns you ought to know - Update Conference 2018
8 cloud design patterns you ought to know - Update Conference 2018Taswar Bhatti
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPhil Leggetter
 
Augmented Reality based Product Identification and Advertising System - Final...
Augmented Reality based Product Identification and Advertising System - Final...Augmented Reality based Product Identification and Advertising System - Final...
Augmented Reality based Product Identification and Advertising System - Final...Udara Alwis
 
Architectural Considerations for Startups
Architectural Considerations for StartupsArchitectural Considerations for Startups
Architectural Considerations for StartupsNiall Roche
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and TogglingBryan Liu
 
The Dependency Injection - Sorin Damian, Software Developer@RomSoft
The Dependency Injection - Sorin Damian, Software Developer@RomSoftThe Dependency Injection - Sorin Damian, Software Developer@RomSoft
The Dependency Injection - Sorin Damian, Software Developer@RomSoftRomSoft SRL
 
Cloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong CodeaholicsCloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong CodeaholicsTaswar Bhatti
 
RubyConf 2012: Custom Reverse Proxies
RubyConf 2012: Custom Reverse ProxiesRubyConf 2012: Custom Reverse Proxies
RubyConf 2012: Custom Reverse Proxiesnickblah
 
JavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform appsJavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform appsTimmy Kokke
 
Oracle licensing rules the 5 fatal mistakes
Oracle licensing rules   the 5 fatal mistakesOracle licensing rules   the 5 fatal mistakes
Oracle licensing rules the 5 fatal mistakesKay Williams
 
Opportunities for the Stock Photo and Microstock Industry
Opportunities for the Stock Photo and Microstock IndustryOpportunities for the Stock Photo and Microstock Industry
Opportunities for the Stock Photo and Microstock IndustryAmos Struck
 
Writing Testable Code in SharePoint
Writing Testable Code in SharePointWriting Testable Code in SharePoint
Writing Testable Code in SharePointTim McCarthy
 
Integrating multiple CDNs at Etsy
Integrating multiple CDNs at EtsyIntegrating multiple CDNs at Etsy
Integrating multiple CDNs at EtsyLaurie Denness
 
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"Christopher Hamm
 
Ng Sydney Dynamic Templates Talk - 18 April 2018
Ng Sydney Dynamic Templates Talk - 18 April 2018Ng Sydney Dynamic Templates Talk - 18 April 2018
Ng Sydney Dynamic Templates Talk - 18 April 2018Roger Kermode
 

Ähnlich wie Dependency Inversion Principle (20)

20181025 integration reloaded_integration_solutions_based_on_reactive_principles
20181025 integration reloaded_integration_solutions_based_on_reactive_principles20181025 integration reloaded_integration_solutions_based_on_reactive_principles
20181025 integration reloaded_integration_solutions_based_on_reactive_principles
 
Integration Reloaded - Integration solutions based on reactive principles
Integration Reloaded - Integration solutions based on reactive principlesIntegration Reloaded - Integration solutions based on reactive principles
Integration Reloaded - Integration solutions based on reactive principles
 
ASP.NET MVC - Latest & Greatest So Far
ASP.NET MVC - Latest & Greatest So FarASP.NET MVC - Latest & Greatest So Far
ASP.NET MVC - Latest & Greatest So Far
 
Governance and Security Solution Patterns
Governance and Security Solution Patterns Governance and Security Solution Patterns
Governance and Security Solution Patterns
 
SQL: Permissions and Data Protection
SQL: Permissions and Data ProtectionSQL: Permissions and Data Protection
SQL: Permissions and Data Protection
 
8 cloud design patterns you ought to know - Update Conference 2018
8 cloud design patterns you ought to know - Update Conference 20188 cloud design patterns you ought to know - Update Conference 2018
8 cloud design patterns you ought to know - Update Conference 2018
 
Patterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 appsPatterns and practices for building enterprise-scale HTML5 apps
Patterns and practices for building enterprise-scale HTML5 apps
 
Augmented Reality based Product Identification and Advertising System - Final...
Augmented Reality based Product Identification and Advertising System - Final...Augmented Reality based Product Identification and Advertising System - Final...
Augmented Reality based Product Identification and Advertising System - Final...
 
Architectural Considerations for Startups
Architectural Considerations for StartupsArchitectural Considerations for Startups
Architectural Considerations for Startups
 
Trunk-Based Development and Toggling
Trunk-Based Development and TogglingTrunk-Based Development and Toggling
Trunk-Based Development and Toggling
 
The Dependency Injection - Sorin Damian, Software Developer@RomSoft
The Dependency Injection - Sorin Damian, Software Developer@RomSoftThe Dependency Injection - Sorin Damian, Software Developer@RomSoft
The Dependency Injection - Sorin Damian, Software Developer@RomSoft
 
Cloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong CodeaholicsCloud Design Patterns - Hong Kong Codeaholics
Cloud Design Patterns - Hong Kong Codeaholics
 
RubyConf 2012: Custom Reverse Proxies
RubyConf 2012: Custom Reverse ProxiesRubyConf 2012: Custom Reverse Proxies
RubyConf 2012: Custom Reverse Proxies
 
JavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform appsJavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform apps
 
Oracle licensing rules the 5 fatal mistakes
Oracle licensing rules   the 5 fatal mistakesOracle licensing rules   the 5 fatal mistakes
Oracle licensing rules the 5 fatal mistakes
 
Opportunities for the Stock Photo and Microstock Industry
Opportunities for the Stock Photo and Microstock IndustryOpportunities for the Stock Photo and Microstock Industry
Opportunities for the Stock Photo and Microstock Industry
 
Writing Testable Code in SharePoint
Writing Testable Code in SharePointWriting Testable Code in SharePoint
Writing Testable Code in SharePoint
 
Integrating multiple CDNs at Etsy
Integrating multiple CDNs at EtsyIntegrating multiple CDNs at Etsy
Integrating multiple CDNs at Etsy
 
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"
 
Ng Sydney Dynamic Templates Talk - 18 April 2018
Ng Sydney Dynamic Templates Talk - 18 April 2018Ng Sydney Dynamic Templates Talk - 18 April 2018
Ng Sydney Dynamic Templates Talk - 18 April 2018
 

Kürzlich hochgeladen

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Kürzlich hochgeladen (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Dependency Inversion Principle

  • 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.
  • 4. 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.
  • 6. Story As a Customer I want to change my password In order to keep my account secure Scenario Given I’m an account holder When I change my password Then It should ensure it is a strong password And it should change my password And it should notify me it has been changed
  • 8. Benefits • Loose coupling • Re-use • Testability
  • 10. Provide Dependency Injection Service Locator
  • 11. Usage • Registration • Entry Point
  • 12. Demo
  • 13. Frameworks •AutoFac • NInject • Castle Windsor • StructureMap • Unity
  • 15. A Little Best Practice • Internal code should not reference the container directly • Verify registration with tests • Constructor Injection over Setter Injection over Service Location
  • 16. 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