Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Setting Boundaries
Search
Francisco Díaz
March 10, 2016
Programming
1
150
Setting Boundaries
Presented at ViDIA meetup.
Francisco Díaz
March 10, 2016
Tweet
Share
More Decks by Francisco Díaz
See All by Francisco Díaz
Inteligencia Artificial en PedidosYa - Una mirada pragmática
fdiaz
0
5
Working effectively at scale
fdiaz
4
300
I hate public speaking. So why do I keep doing it?
fdiaz
0
140
Definiendo límites
fdiaz
1
130
Si odio hablar en público. ¿Por qué lo sigo haciendo?
fdiaz
2
150
Move fast and keep your code quality
fdiaz
1
380
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
150
Swift Values
fdiaz
0
140
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
130
Other Decks in Programming
See All in Programming
sbt 2
xuwei_k
0
300
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
150
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
360
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
340
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
130
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.7k
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
310
connect-python: convenient protobuf RPC for Python
anuraaga
0
410
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.4k
ゲームの物理 剛体編
fadis
0
350
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
9
1.2k
AIコーディングエージェント(NotebookLM)
kondai24
0
190
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.4k
Agile that works and the tools we love
rasmusluckow
331
21k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Code Review Best Practice
trishagee
74
19k
GitHub's CSS Performance
jonrohan
1032
470k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
390
What's in a price? How to price your products and services
michaelherold
246
13k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
A designer walks into a library…
pauljervisheath
210
24k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Why Our Code Smells
bkeepers
PRO
340
57k
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