Your SlideShare is downloading. ×
0
Design Principles
Incremental Design,
Single Responsibility,
and Dependency Inversion
Michael Denomy
September 19, 2013
La...
About Me
Tech Lead at Cyrus Innovation
Passionate about Agile and XP
Pairing
TDD
Incremental Design
Contact Me
@mdenomy on...
SOLID Design Principles
Set of principles identified by Bob
Martin, aka Uncle Bob
- Somewhere in the 1995-2000 timeframe
-...
SOLID Design Principles
S Single Responsibility
O Open-Closed
L Liskov Substitution
I Interface Segregation
D Dependency I...
SOLID Design Principles
S Single Responsibility
D Dependency Inversion
not Dependency Injection
That’s plenty for today
Su...
Single Responsibility
Official Definition
- A class should have only one reason to
change
What It Means To You
- Keep your...
Dependency Inversion
Official Definition
- Depend on abstractions not concretions
What It Means To You
- Your class should...
Incremental Design
Always Be Designing
Pay attention to “code smells”
The simplest thing that works
Red-Green-Refactor
not...
Let’s Look at Some Code
Really Simple Example of a
CheckingAccount
Work in small increments
Learn about the problem as we ...
Take-Aways
Work small
Pay attention to design trade-offs,
technical debt, and naming
Be students of your craft
Processes, ...
References
Bob Martin (Uncle Bob) on SOLID
http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
Sandi Metz - SOLID Tal...
ThankYou
Q&A
Sunday, September 22, 13
Design Principles
Incremental Design,
Single Responsibility,
and Dependency Inversion
Michael Denomy
September 19, 2013
La...
Upcoming SlideShare
Loading in...5
×

Design Principles - Michael Denomy at Launch Academy

1,237

Published on

In this talk I gave at Launch Academy, a developer boot-camp in Boston, I go over some key design principles. I introduce the SOLID design principles, focusing on Single Responsibility and Dependency Inversion, as well as talk about Incremental Design

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,237
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Design Principles - Michael Denomy at Launch Academy"

  1. 1. Design Principles Incremental Design, Single Responsibility, and Dependency Inversion Michael Denomy September 19, 2013 Launch Academy, Boston MA Sunday, September 22, 13
  2. 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. 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. 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. 5. SOLID Design Principles S Single Responsibility D Dependency Inversion not Dependency Injection That’s plenty for today Sunday, September 22, 13
  6. 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. 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. 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. 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. 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. 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
  12. 12. ThankYou Q&A Sunday, September 22, 13
  13. 13. Design Principles Incremental Design, Single Responsibility, and Dependency Inversion Michael Denomy September 19, 2013 Launch Academy Sunday, September 22, 13
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×