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
MatteoVaccariBirthdayGreetingsKataInSCBCN2013
Search
trikitrok
September 28, 2013
Programming
0
170
MatteoVaccariBirthdayGreetingsKataInSCBCN2013
Presentation for Matteo Vaccari's Birthday Greetings Refactoring Kata that we did in SCBCN
trikitrok
September 28, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
TDD 実践ミニトーク
contour_gara
1
290
Laravel Boost 超入門
fire_arlo
2
210
テストカバレッジ100%を10年続けて得られた学びと品質
mottyzzz
2
570
個人軟體時代
ethanhuang13
0
320
RDoc meets YARD
okuramasafumi
4
170
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
21
5.6k
Kiroで始めるAI-DLC
kaonash
2
580
Compose Multiplatform × AI で作る、次世代アプリ開発支援ツールの設計と実装
thagikura
0
140
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
250
Updates on MLS on Ruby (and maybe more)
sylph01
1
180
Navigating Dependency Injection with Metro
zacsweers
3
230
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
390
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
A Tale of Four Properties
chriscoyier
160
23k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
111
20k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Rails Girls Zürich Keynote
gr2m
95
14k
How to train your dragon (web standard)
notwaldorf
96
6.2k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Site-Speed That Sticks
csswizardry
10
810
Transcript
Birthday Greetings Kata Manuel Rivero @trikitrok
The kata Created by Matteo Vaccari. Alistair Cockburn's:
Ports and Adapters. a. k. a. Hexagonal Architecture Refactoring version.
The initial code Clone it from: https://github.com/trikitrok/BirthdayGreetingsKata SCBCN2013InitialCode
The initial code 1. Read employee records from a file.
2. Filter employees whose birthday is today. 3. Send a personalized greetings message by email.
Problems BirthdayService Has too many responsibilities. Depends
on low level APIs. Talks with external systems. ...
Ports and Adapters
In the ports and adapters architecture Domain Model depends
on nothing Everything depends on the domain model
Ports and Adapters
Benefits Easier to change as requirements change Easier
to test Easier to understand
Ports and Adapters
Ports and Adapters
Ports and Adapters Port Façade (interface) → Adapter
Concrete → implementation
Ports and Adapters
Refactoring technique Small steps! Keep tests green at
all times!
Refactoring approach 1. Identify a responsibility 2. Extract a method
3. Create a new class 4. Move that method to the new class
Refactoring guides Single Responsibility Principle First at function
level, then at class level. Dependency Inversion Principle
None
Let's start!