SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
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

Contenu connexe

Similaire à 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
 

Similaire à 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
 

Plus de Michael Denomy

Plus de 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
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

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