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
Francisco Díaz
March 10, 2016
Programming
180
1
Share
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
28
Working effectively at scale
fdiaz
4
320
I hate public speaking. So why do I keep doing it?
fdiaz
0
160
Definiendo límites
fdiaz
1
150
Si odio hablar en público. ¿Por qué lo sigo haciendo?
fdiaz
2
170
Move fast and keep your code quality
fdiaz
1
410
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
170
Swift Values
fdiaz
0
160
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
150
Other Decks in Programming
See All in Programming
From Formal Specification to Property Based Test
ohbarye
0
710
when storing skills in S3 file
watany
3
1.3k
Agent Skills を社内で育てる仕組み作り
jackchuka
1
1.4k
実用!Hono RPC2026
yodaka
2
300
Road to RubyKaigi: Play Hard(ware)
makicamel
1
550
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
2.5k
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
🦞OpenClaw works with AWS
licux
1
330
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.5k
10 Tips of AWS ~Gen AI on AWS~
licux
5
540
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
360
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
180
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
280
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
500
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
Everyday Curiosity
cassininazir
0
200
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
190
The Mindset for Success: Future Career Progression
greggifford
PRO
0
320
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
200
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
100
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
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