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
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
36
11k
Introducing RemoteCompose: break your UI out of the app sandbox.
camaelon
2
540
レイトレZ世代に捧ぐ、今からレイトレを始めるための小径
ichi_raven
0
250
チーム開発の “地ならし"
konifar
6
3.6k
2026年向け会社紹介資料
misu
0
160
The Missing Link in Angular's Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
110
Tangible Code
chobishiba
3
530
PyCon mini 東海 2025「個人ではじめるマルチAIエージェント入門 〜LangChain × LangGraphでアイデアを形にするステップ〜」
komofr
3
930
例外処理を理解して、設計段階からエラーを見つけやすく、起こりにくく #phpconfuk
kajitack
12
5.8k
自動テストのアーキテクチャとその理由ー大規模ゲーム開発の場合ー
segadevtech
2
960
なぜ強調表示できず ** が表示されるのか — Perlで始まったMarkdownの歴史と日本語文書における課題
kwahiro
9
5.3k
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
9
3.8k
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Unsuck your backbone
ammeep
671
58k
Become a Pro
speakerdeck
PRO
29
5.6k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
660
Scaling GitHub
holman
463
140k
GitHub's CSS Performance
jonrohan
1032
470k
Balancing Empowerment & Direction
lara
5
740
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
A better future with KSS
kneath
239
18k
Faster Mobile Websites
deanohume
310
31k
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!