SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Design Principles
Incremental Design,
Single Responsibility,
and Dependency Inversion
Michael Denomy
September 19, 2013
Launch Academy, Boston MA
Sunday, September 22, 13
About Me
Tech Lead at Cyrus Innovation
Passionate about Agile and XP
Pairing
TDD
Incremental Design
Contact Me
@mdenomy on Twitter and GitHub
http://mdenomy.wordpress.com/
Sunday, September 22, 13
SOLID Design Principles
Set of principles identified by Bob
Martin, aka Uncle Bob
- Somewhere in the 1995-2000 timeframe
- Uncle Bob has some strong opinions on
software, you should check them out
Sunday, September 22, 13
SOLID Design Principles
S Single Responsibility
O Open-Closed
L Liskov Substitution
I Interface Segregation
D Dependency Inversion
not Dependency Injection
Sunday, September 22, 13
SOLID Design Principles
S Single Responsibility
D Dependency Inversion
not Dependency Injection
That’s plenty for today
Sunday, September 22, 13
Single Responsibility
Official Definition
- A class should have only one reason to
change
What It Means To You
- Keep your classes small
- Don’t mix responsibilities
- CheckingAccount manages balance and
calculates fees
Sunday, September 22, 13
Dependency Inversion
Official Definition
- Depend on abstractions not concretions
What It Means To You
- Your class should not know the details of its
dependencies, just the interfaces
- Ideally both ends of the dependency
relationship deal with abstractions, i.e.
interfaces
- Dependency injection is a way to implement
dependency inversion
Sunday, September 22, 13
Incremental Design
Always Be Designing
Pay attention to “code smells”
The simplest thing that works
Red-Green-Refactor
not Red-Green-Red-Green-Red-Green
-Refactor-Refactor-Refactor-Refactor-Refactor
You will never know less than you
know now
- Sandi Metz, Practical OOD in Ruby (POODR)
Sunday, September 22, 13
Let’s Look at Some Code
Really Simple Example of a
CheckingAccount
Work in small increments
Learn about the problem as we go
Listen for code smells
https://github.com/mdenomy/intro-design-workshop
Note:Readme contains design thoughts as I go
Sunday, September 22, 13
Take-Aways
Work small
Pay attention to design trade-offs,
technical debt, and naming
Be students of your craft
Processes, frameworks, tools, everything
Challenge your assumptions
Just cause it’s the “right” way today...
Sunday, September 22, 13
References
Bob Martin (Uncle Bob) on SOLID
http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
Sandi Metz - SOLID Talk at
GORUCO
http://www.confreaks.com/videos/240-goruco2009-solid-object-
oriented-design
Derick Bailey - Los Techies
http://lostechies.com/derickbailey/2011/09/22/dependency-injection-
is-not-the-same-as-the-dependency-inversion-principle/
James Shore - Art of Agile
http://www.jamesshore.com/Agile-Book/incremental_design.html
Sunday, September 22, 13
ThankYou
Q&A
Sunday, September 22, 13
Design Principles
Incremental Design,
Single Responsibility,
and Dependency Inversion
Michael Denomy
September 19, 2013
Launch Academy
Sunday, September 22, 13

Weitere ähnliche Inhalte

Ähnlich wie Design Principles - Michael Denomy at Launch Academy

Building a Responsive Web Design Process
Building a Responsive Web Design ProcessBuilding a Responsive Web Design Process
Building a Responsive Web Design ProcessLydia Whitehead
 
Inventing The Next Business Programming Language
Inventing The Next Business Programming LanguageInventing The Next Business Programming Language
Inventing The Next Business Programming LanguageRichard Green
 
Innovation day 2012 1. zane smilga - verhaert - 'innovate your innovation!'
Innovation day 2012   1. zane smilga - verhaert - 'innovate your innovation!'Innovation day 2012   1. zane smilga - verhaert - 'innovate your innovation!'
Innovation day 2012 1. zane smilga - verhaert - 'innovate your innovation!'Verhaert Masters in Innovation
 
Developing solid applications
Developing solid applicationsDeveloping solid applications
Developing solid applicationsNilesh Bangar
 
(now an old version) The Web and Beyond: "Siri, did I leave the oven on?" Mun...
(now an old version) The Web and Beyond: "Siri, did I leave the oven on?" Mun...(now an old version) The Web and Beyond: "Siri, did I leave the oven on?" Mun...
(now an old version) The Web and Beyond: "Siri, did I leave the oven on?" Mun...Claire Rowland
 
Design Types
Design TypesDesign Types
Design Types1&1
 
Software estimating
Software estimatingSoftware estimating
Software estimatingAdam Cole
 
SOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User GroupSOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User GroupAdnan Masood
 
The Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to BurstThe Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to BurstChris Sterling
 
LUXr 1-day workshop, Fri September 28, 2012 [San Francisco]
LUXr 1-day workshop, Fri September 28, 2012 [San Francisco]LUXr 1-day workshop, Fri September 28, 2012 [San Francisco]
LUXr 1-day workshop, Fri September 28, 2012 [San Francisco]LUXr
 
PFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP AppsPFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP AppsPablo Godel
 
Pay Now or Pay More Every Day: Reduce Technical Debt Now!
Pay Now or Pay More Every Day: Reduce Technical Debt Now!Pay Now or Pay More Every Day: Reduce Technical Debt Now!
Pay Now or Pay More Every Day: Reduce Technical Debt Now!TechWell
 
BDD - Behavior Driven Development
BDD - Behavior Driven DevelopmentBDD - Behavior Driven Development
BDD - Behavior Driven DevelopmentbloomYa Group
 
Maintaining a big open source project: lessons learned
Maintaining a big open source project: lessons learnedMaintaining a big open source project: lessons learned
Maintaining a big open source project: lessons learnedLeonardo Tegon
 
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-Developer
Apps, Timeline and Facepile:  Making Sense of Facebook as a Non-DeveloperApps, Timeline and Facepile:  Making Sense of Facebook as a Non-Developer
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-Developerlinds313
 
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-Developer
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-DeveloperApps, Timeline and Facepile: Making Sense of Facebook as a Non-Developer
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-DeveloperEngauge
 
Ux design bar camp
Ux design   bar campUx design   bar camp
Ux design bar campRatha Hin
 
Telling and selling the UX story
Telling and selling the UX story Telling and selling the UX story
Telling and selling the UX story Mike De Regt
 

Ähnlich wie Design Principles - Michael Denomy at Launch Academy (20)

Building a Responsive Web Design Process
Building a Responsive Web Design ProcessBuilding a Responsive Web Design Process
Building a Responsive Web Design Process
 
Inventing The Next Business Programming Language
Inventing The Next Business Programming LanguageInventing The Next Business Programming Language
Inventing The Next Business Programming Language
 
Innovation day 2012 1. zane smilga - verhaert - 'innovate your innovation!'
Innovation day 2012   1. zane smilga - verhaert - 'innovate your innovation!'Innovation day 2012   1. zane smilga - verhaert - 'innovate your innovation!'
Innovation day 2012 1. zane smilga - verhaert - 'innovate your innovation!'
 
Developing solid applications
Developing solid applicationsDeveloping solid applications
Developing solid applications
 
(now an old version) The Web and Beyond: "Siri, did I leave the oven on?" Mun...
(now an old version) The Web and Beyond: "Siri, did I leave the oven on?" Mun...(now an old version) The Web and Beyond: "Siri, did I leave the oven on?" Mun...
(now an old version) The Web and Beyond: "Siri, did I leave the oven on?" Mun...
 
Design Types
Design TypesDesign Types
Design Types
 
Software estimating
Software estimatingSoftware estimating
Software estimating
 
SOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User GroupSOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User Group
 
04 design concepts_n_principles
04 design concepts_n_principles04 design concepts_n_principles
04 design concepts_n_principles
 
The Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to BurstThe Software Debt Bubble: Is It About to Burst
The Software Debt Bubble: Is It About to Burst
 
LUXr 1-day workshop, Fri September 28, 2012 [San Francisco]
LUXr 1-day workshop, Fri September 28, 2012 [San Francisco]LUXr 1-day workshop, Fri September 28, 2012 [San Francisco]
LUXr 1-day workshop, Fri September 28, 2012 [San Francisco]
 
PFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP AppsPFCongres 2012 - Rock Solid Deployment of PHP Apps
PFCongres 2012 - Rock Solid Deployment of PHP Apps
 
At2012 bengaluru leanand_designthinking_manikc
At2012 bengaluru leanand_designthinking_manikcAt2012 bengaluru leanand_designthinking_manikc
At2012 bengaluru leanand_designthinking_manikc
 
Pay Now or Pay More Every Day: Reduce Technical Debt Now!
Pay Now or Pay More Every Day: Reduce Technical Debt Now!Pay Now or Pay More Every Day: Reduce Technical Debt Now!
Pay Now or Pay More Every Day: Reduce Technical Debt Now!
 
BDD - Behavior Driven Development
BDD - Behavior Driven DevelopmentBDD - Behavior Driven Development
BDD - Behavior Driven Development
 
Maintaining a big open source project: lessons learned
Maintaining a big open source project: lessons learnedMaintaining a big open source project: lessons learned
Maintaining a big open source project: lessons learned
 
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-Developer
Apps, Timeline and Facepile:  Making Sense of Facebook as a Non-DeveloperApps, Timeline and Facepile:  Making Sense of Facebook as a Non-Developer
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-Developer
 
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-Developer
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-DeveloperApps, Timeline and Facepile: Making Sense of Facebook as a Non-Developer
Apps, Timeline and Facepile: Making Sense of Facebook as a Non-Developer
 
Ux design bar camp
Ux design   bar campUx design   bar camp
Ux design bar camp
 
Telling and selling the UX story
Telling and selling the UX story Telling and selling the UX story
Telling and selling the UX story
 

Mehr von Michael Denomy

Intro to automated testing
Intro to automated testingIntro to automated testing
Intro to automated testingMichael Denomy
 
Breathe In and Out With Me - Burlington Ruby Conference 2015
Breathe In and Out With Me - Burlington Ruby Conference 2015Breathe In and Out With Me - Burlington Ruby Conference 2015
Breathe In and Out With Me - Burlington Ruby Conference 2015Michael Denomy
 
Writing Maintainable Tests with PageObjects
Writing Maintainable Tests with PageObjectsWriting Maintainable Tests with PageObjects
Writing Maintainable Tests with PageObjectsMichael Denomy
 
Memory Management in RubyMotion
Memory Management in RubyMotionMemory Management in RubyMotion
Memory Management in RubyMotionMichael Denomy
 
Aikido, Controller Tests, and LinkedIn
Aikido, Controller Tests, and LinkedInAikido, Controller Tests, and LinkedIn
Aikido, Controller Tests, and LinkedInMichael Denomy
 
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotionFrom Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotionMichael Denomy
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven DevelopmentMichael Denomy
 

Mehr von Michael Denomy (9)

Intro to automated testing
Intro to automated testingIntro to automated testing
Intro to automated testing
 
Breathe In and Out With Me - Burlington Ruby Conference 2015
Breathe In and Out With Me - Burlington Ruby Conference 2015Breathe In and Out With Me - Burlington Ruby Conference 2015
Breathe In and Out With Me - Burlington Ruby Conference 2015
 
Writing Maintainable Tests with PageObjects
Writing Maintainable Tests with PageObjectsWriting Maintainable Tests with PageObjects
Writing Maintainable Tests with PageObjects
 
Memory Management in RubyMotion
Memory Management in RubyMotionMemory Management in RubyMotion
Memory Management in RubyMotion
 
Aikido, Controller Tests, and LinkedIn
Aikido, Controller Tests, and LinkedInAikido, Controller Tests, and LinkedIn
Aikido, Controller Tests, and LinkedIn
 
Reinventing Yourself
Reinventing YourselfReinventing Yourself
Reinventing Yourself
 
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotionFrom Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
From Ruby on Rails to RubyMotion - Writing your First iOS App with RubyMotion
 
Debugging rails
Debugging railsDebugging rails
Debugging rails
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 

Kürzlich hochgeladen

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingThe Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingSelcen Ozturkcan
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Kürzlich hochgeladen (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central BankingThe Evolution of Money: Digital Transformation and CBDCs in Central Banking
The Evolution of Money: Digital Transformation and CBDCs in Central Banking
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Design Principles - Michael Denomy at Launch Academy

  • 1. Design Principles Incremental Design, Single Responsibility, and Dependency Inversion Michael Denomy September 19, 2013 Launch Academy, Boston MA Sunday, September 22, 13
  • 2. About Me Tech Lead at Cyrus Innovation Passionate about Agile and XP Pairing TDD Incremental Design Contact Me @mdenomy on Twitter and GitHub http://mdenomy.wordpress.com/ Sunday, September 22, 13
  • 3. SOLID Design Principles Set of principles identified by Bob Martin, aka Uncle Bob - Somewhere in the 1995-2000 timeframe - Uncle Bob has some strong opinions on software, you should check them out Sunday, September 22, 13
  • 4. SOLID Design Principles S Single Responsibility O Open-Closed L Liskov Substitution I Interface Segregation D Dependency Inversion not Dependency Injection Sunday, September 22, 13
  • 5. SOLID Design Principles S Single Responsibility D Dependency Inversion not Dependency Injection That’s plenty for today Sunday, September 22, 13
  • 6. Single Responsibility Official Definition - A class should have only one reason to change What It Means To You - Keep your classes small - Don’t mix responsibilities - CheckingAccount manages balance and calculates fees Sunday, September 22, 13
  • 7. Dependency Inversion Official Definition - Depend on abstractions not concretions What It Means To You - Your class should not know the details of its dependencies, just the interfaces - Ideally both ends of the dependency relationship deal with abstractions, i.e. interfaces - Dependency injection is a way to implement dependency inversion Sunday, September 22, 13
  • 8. Incremental Design Always Be Designing Pay attention to “code smells” The simplest thing that works Red-Green-Refactor not Red-Green-Red-Green-Red-Green -Refactor-Refactor-Refactor-Refactor-Refactor You will never know less than you know now - Sandi Metz, Practical OOD in Ruby (POODR) Sunday, September 22, 13
  • 9. Let’s Look at Some Code Really Simple Example of a CheckingAccount Work in small increments Learn about the problem as we go Listen for code smells https://github.com/mdenomy/intro-design-workshop Note:Readme contains design thoughts as I go Sunday, September 22, 13
  • 10. Take-Aways Work small Pay attention to design trade-offs, technical debt, and naming Be students of your craft Processes, frameworks, tools, everything Challenge your assumptions Just cause it’s the “right” way today... Sunday, September 22, 13
  • 11. References Bob Martin (Uncle Bob) on SOLID http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod Sandi Metz - SOLID Talk at GORUCO http://www.confreaks.com/videos/240-goruco2009-solid-object- oriented-design Derick Bailey - Los Techies http://lostechies.com/derickbailey/2011/09/22/dependency-injection- is-not-the-same-as-the-dependency-inversion-principle/ James Shore - Art of Agile http://www.jamesshore.com/Agile-Book/incremental_design.html Sunday, September 22, 13
  • 13. Design Principles Incremental Design, Single Responsibility, and Dependency Inversion Michael Denomy September 19, 2013 Launch Academy Sunday, September 22, 13