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
スモールスタートで始めるためのLambda×モノリス(Lambdalith)
akihisaikeda
2
290
PHPバージョンアップから始めるOSSコントリビュート / how2oss-contribute
dmnlk
1
1.1k
リストビュー画面UX改善の振り返り
splcywolf
0
150
AHC045_解説
shun_pi
0
540
The Nature of Complexity in John Ousterhout’s Philosophy of Software Design
philipschwarz
PRO
0
110
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
0
850
State of Namespace
tagomoris
4
1.8k
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
150
メモリウォールを超えて:キャッシュメモリ技術の進歩
kawayu
0
1.9k
Vibe Coding の話をしよう
schroneko
8
2.2k
PHP で学ぶ OAuth 入門
azuki
1
200
Unlock the Potential of Swift Code Generation
rockname
0
260
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Embracing the Ebb and Flow
colly
85
4.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
29
5.6k
Visualization
eitanlees
146
16k
Building Applications with DynamoDB
mza
94
6.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
135
33k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
13
680
Docker and Python
trallard
44
3.3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
[RailsConf 2023] Rails as a piece of cake
palkan
54
5.4k
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!