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
1
160
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
10
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
400
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
160
Swift Values
fdiaz
0
140
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
140
Other Decks in Programming
See All in Programming
AgentCoreとHuman in the Loop
har1101
5
220
Fluid Templating in TYPO3 14
s2b
0
130
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
6
1.9k
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
CSC307 Lecture 03
javiergs
PRO
1
490
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
AI時代の認知負荷との向き合い方
optfit
0
140
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
160
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Color Theory Basics | Prateek | Gurzu
gurzu
0
190
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Balancing Empowerment & Direction
lara
5
880
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
AI: The stuff that nobody shows you
jnunemaker
PRO
2
240
Building Adaptive Systems
keathley
44
2.9k
Embracing the Ebb and Flow
colly
88
5k
The SEO identity crisis: Don't let AI make you average
varn
0
64
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How STYLIGHT went responsive
nonsquared
100
6k
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