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
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
230
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
4
390
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.3k
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
120
SpringBoot3.4の構造化ログ #kanjava
irof
2
1k
Ruby on cygwin 2025-02
fd0
0
140
ARA Ansible for the teams
kksat
0
150
Amazon ECS とマイクロサービスから考えるシステム構成
hiyanger
2
560
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
9
1.8k
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
3
750
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.3k
Featured
See All Featured
Done Done
chrislema
182
16k
GitHub's CSS Performance
jonrohan
1030
460k
Designing for humans not robots
tammielis
250
25k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
330
The Cult of Friendly URLs
andyhume
78
6.2k
Building Your Own Lightsaber
phodgson
104
6.2k
Faster Mobile Websites
deanohume
306
31k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
How to Ace a Technical Interview
jacobian
276
23k
Facilitating Awesome Meetings
lara
52
6.2k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Rails Girls Zürich Keynote
gr2m
94
13k
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!