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
Setting Boundaries
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Francisco Díaz
March 10, 2016
Programming
190
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Setting Boundaries
Presented at ViDIA meetup.
Francisco Díaz
March 10, 2016
More Decks by Francisco Díaz
See All by Francisco Díaz
Inteligencia Artificial en PedidosYa - Una mirada pragmática
fdiaz
0
35
Working effectively at scale
fdiaz
4
320
I hate public speaking. So why do I keep doing it?
fdiaz
0
170
Definiendo límites
fdiaz
1
160
Si odio hablar en público. ¿Por qué lo sigo haciendo?
fdiaz
2
180
Move fast and keep your code quality
fdiaz
1
420
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
180
Swift Values
fdiaz
0
170
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
160
Other Decks in Programming
See All in Programming
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
540
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
340
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
240
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
140
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
250
Webフレームワークの ベンチマークについて
yusukebe
0
170
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
680
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
170
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
A2UI という光を覗いてみる
satohjohn
1
140
さぁV100、メモリをお食べ・・・
nilpe
0
140
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
230
Test your architecture with Archunit
thirion
1
2.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
430
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
410
Unsuck your backbone
ammeep
672
58k
A better future with KSS
kneath
240
18k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
Building an army of robots
kneath
306
46k
Transcript
Setting Boundaries
None
Francisco Díaz @fco_diaz
3 iOS Devs 28 hours 1 project == Merge Conflicts
What do we want? → Minimize duplication of code. →
Develop independently without stepping on each other's toes.
Feature verticals: → Big Panic button → Today widget →
Knock
Big Panic button:
What needs to be done? → Create the button. →
We need a way to create reports. → Make a backend call to save this information.
Today widget:
What needs to be done? → Create the extension button.
→ We need a way to create reports. → Make a backend call to save this information.
What was it that we wanted? → Minimize duplication of
code. → Develop independently without stepping on each other's toes.
None
Let's try again!
→ Create the button. → We need a way to
create reports. → Make a backend call to save this information.
UI / Presentation Create the button.
Business logic We need a way to create reports.
Backend connection Make a backend call to save this information.
None
To recap: → Minimize duplication of code. → Develop independently
without stepping on each other's toes.
We can solve any problem by introducing an extra level
of indirection — David Wheeler
Dependency inversion
struct ModelDataManager { let APIClient: APIType init(APIClient: APIType) { self.APIClient
= APIClient } }
protocol APIType { func createReport(completion: JSONDictionary? -> Void) } struct
API { private let manager: Alamofire.Manager init() { manager = Alamofire.Manager() } } extension API: APIType { func createReport(completion: JSONDictionary? -> Void) { manager.request(.POST, "https://some.com/api/report") .responseJSON { response in completion(response) } } }
struct ModelDataManager { let APIClient: APIType init(API: APIType) { self.APIClient
= API } static func defaultManager() -> ModelDataManager { let APIClient = API() return ModelDataManager(API: APIClient) } func createReport(completionHandler completion: Report? -> Void) { APIClient.createReport() { jsonDictionary in let report = ... // Parse jsonDictionary into Report completion(report) } } }
Benefits → Testable. → Decoupled. → Easy to fake our
networking layer.
None
struct FakeAPI: APIType { func createReport(completion: JSONDictionary? -> Void) {
let dictionary = ["id": 12345] completion(dictionary) } }
struct ModelDataManager { let APIClient: APIType init(API: APIType) { self.APIClient
= API } static func defaultManager() -> ModelDataManager { // let APIClient = API() let APIClient = FakeAPI() return ModelDataManager(API: APIClient) } }
Questions? Slides are available at: https://github.com/fdiaz/settings-boundaries-talk References: Architecture: The Lost
Years The Clean Architecture