Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Setting Boundaries
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Francisco Díaz
March 10, 2016
Programming
220
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
68
Working effectively at scale
fdiaz
4
340
I hate public speaking. So why do I keep doing it?
fdiaz
0
190
Definiendo límites
fdiaz
1
170
Si odio hablar en público. ¿Por qué lo sigo haciendo?
fdiaz
2
210
Move fast and keep your code quality
fdiaz
1
450
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
190
Swift Values
fdiaz
0
190
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
180
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
460
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
12
10k
気持ちぃ〜角丸 Squircle
ryu1013
0
360
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
230
sbt 2.0: takeoff
eed3si9n
0
170
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
170
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
250
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
200
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
620
Vue Fes Japan の “作る側”に関わってみて
naokihaba
1
200
AmebaブログはKMPから卒業します
kmars0605
0
280
JIS keyboard support in Omarchy
lef237
0
160
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
820
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
The Curious Case for Waylosing
cassininazir
1
580
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
The untapped power of vector embeddings
frankvandijk
2
2k
HDC tutorial
michielstock
2
980
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Utilizing Notion as your number one productivity tool
mfonobong
4
630
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