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

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 applications
Nilesh Bangar
 
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
Pablo Godel
 
BDD - Behavior Driven Development
BDD - Behavior Driven DevelopmentBDD - Behavior Driven Development
BDD - Behavior Driven Development
bloomYa Group
 

Ä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

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

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

KĂŒrzlich hochgeladen (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 

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