design principles - michael denomy at launch academy
DESCRIPTION
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 DesignTRANSCRIPT
![Page 1: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/1.jpg)
Design PrinciplesIncremental Design, Single Responsibility,
and Dependency Inversion
Michael DenomySeptember 19, 2013Launch Academy, Boston MA
Sunday, September 22, 13
![Page 2: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/2.jpg)
About MeTech Lead at Cyrus Innovation
Passionate about Agile and XPPairingTDDIncremental Design
Contact Me@mdenomy on Twitter and GitHubhttp://mdenomy.wordpress.com/
Sunday, September 22, 13
![Page 3: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/3.jpg)
SOLID Design PrinciplesSet 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
![Page 4: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/4.jpg)
SOLID Design PrinciplesS Single ResponsibilityO Open-Closed L Liskov SubstitutionI Interface SegregationD Dependency Inversion not Dependency Injection
Sunday, September 22, 13
![Page 5: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/5.jpg)
SOLID Design PrinciplesS Single ResponsibilityD Dependency Inversion not Dependency Injection
That’s plenty for today
Sunday, September 22, 13
![Page 6: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/6.jpg)
Single ResponsibilityOfficial 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
![Page 7: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/7.jpg)
Dependency InversionOfficial 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
![Page 8: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/8.jpg)
Incremental DesignAlways Be DesigningPay attention to “code smells”The simplest thing that worksRed-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
![Page 9: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/9.jpg)
Let’s Look at Some CodeReally 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-workshopNote:Readme contains design thoughts as I go
Sunday, September 22, 13
![Page 10: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/10.jpg)
Take-AwaysWork small
Pay attention to design trade-offs, technical debt, and naming
Be students of your craftProcesses, frameworks, tools, everything
Challenge your assumptionsJust cause it’s the “right” way today...
Sunday, September 22, 13
![Page 11: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/11.jpg)
ReferencesBob Martin (Uncle Bob) on SOLIDhttp://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
Sandi Metz - SOLID Talk at GORUCOhttp://www.confreaks.com/videos/240-goruco2009-solid-object-oriented-design
Derick Bailey - Los Techieshttp://lostechies.com/derickbailey/2011/09/22/dependency-injection-is-not-the-same-as-the-dependency-inversion-principle/
James Shore - Art of Agilehttp://www.jamesshore.com/Agile-Book/incremental_design.html
Sunday, September 22, 13
![Page 12: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/12.jpg)
Thank YouQ&A
Sunday, September 22, 13
![Page 13: Design Principles - Michael Denomy at Launch Academy](https://reader033.vdocument.in/reader033/viewer/2022060117/5584658ad8b42ad1588b4aab/html5/thumbnails/13.jpg)
Design PrinciplesIncremental Design, Single Responsibility,
and Dependency Inversion
Michael DenomySeptember 19, 2013Launch Academy
Sunday, September 22, 13