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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
並行開発のためのコードレビュー
miyukiw
0
880
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
220
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
440
Oxlint JS plugins
kazupon
1
990
CSC307 Lecture 05
javiergs
PRO
0
500
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
250
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
高速開発のためのコード整理術
sutetotanuki
1
410
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
480
Grafana:建立系統全知視角的捷徑
blueswen
0
330
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
110
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
330
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
Done Done
chrislema
186
16k
Believing is Seeing
oripsolob
1
58
Are puppies a ranking factor?
jonoalderson
1
2.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Building the Perfect Custom Keyboard
takai
2
690
The Curious Case for Waylosing
cassininazir
0
240
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
A better future with KSS
kneath
240
18k
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!