Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Single responsibility principle
Search
Grzegorz Wilczyński
November 12, 2012
Programming
2
190
Single responsibility principle
Single responsibility principle
Grzegorz Wilczyński
November 12, 2012
Tweet
Share
More Decks by Grzegorz Wilczyński
See All by Grzegorz Wilczyński
REWRITE'EM ALL
gwilczynski
2
470
Chain made out of coins - smart introduction to blockchain
gwilczynski
0
93
WebComponents or shadow side of the Doom
gwilczynski
0
48
clean code
gwilczynski
0
130
git scm in one hour
gwilczynski
0
110
Productivity for Programmers
gwilczynski
3
200
Git branching model for TAPTeam
gwilczynski
0
920
JS design patterns
gwilczynski
6
360
Other Decks in Programming
See All in Programming
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
150
Introduction to kotlinx.rpc
arawn
0
770
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
14
4.6k
Open source software: how to live long and go far
gaelvaroquaux
0
660
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
200
自力でTTSモデルを作った話
zgock999
0
100
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.5k
sappoRo.R #12 初心者セッション
kosugitti
0
280
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
140
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
990
Jakarta EE meets AI
ivargrimstad
0
360
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
210
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
137
6.8k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
How STYLIGHT went responsive
nonsquared
98
5.4k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Visualization
eitanlees
146
15k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Building Applications with DynamoDB
mza
93
6.2k
A better future with KSS
kneath
238
17k
Fireside Chat
paigeccino
34
3.2k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Transcript
Design patterns: The Single-Responsibility Principle Grzegorz Wilczyński 11th november 2012
SOLID The principles when applied together intend to make it
more likely that a programmer will create a system that is easy to maintain and extend over time. http://en.wikipedia.org/wiki/Solid_(object-oriented_design)
SOLID Single responsibility Open-closed Liskov substitution Interface segregation Dependency inversion
http://en.wikipedia.org/wiki/Solid_(object-oriented_design)
BIBLE http://www.amazon.com/Agile-Principles-Patterns-Practices-C/dp/0131857258
Rule #1 A class should have only one reason to
change. "Agile Principles, Patterns, and Practices in C#" Robert C. Martin
Rule #2 A class should have only one reason to
change. "Agile Principles, Patterns, and Practices in C#" Robert C. Martin
So please don't... http://3.bp.blogspot.com/-FQZ4VT_gbRY/T8RvXLTPWMI/AAAAAAAABP0/JCckSpENM88/s640/SingleResponsibilityPrinciple.jpg
Step 1 http://www.remondo.net/wp-content/uploads/2012/03/SingleResponsibilityPrincipleRadio.png
Step 2 http://www.remondo.net/wp-content/uploads/2012/03/SingleResponsibilityPrincipleRadioManagers.png
Homework $ git branch gw-solid-1 end time: 16.11.2012