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
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
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
150
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
150
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.2k
Domain-Driven Transformation
hschwentner
2
2.3k
dotNET_vulnclicker_intro.pdf
deka_morita
0
150
AI-Powered Domain-Driven Design
ziobrando
0
340
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3k
R8 の設定見直しでアプリサイズ削減
andpad
0
230
Seven New Principles of Software Engineering
yegor256
0
350
パスワード再設定メールのURLについて知っておこう
uyuki234
0
190
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.1k
APNsからLive Activityを開始する話
yumnumm
0
180
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
330
The World Runs on Bad Software
bkeepers
PRO
72
12k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
Paper Plane
katiecoart
PRO
5
54k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Technical Leadership for Architectural Decision Making
baasie
3
620
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
370
Darren the Foodie - Storyboard
khoart
PRO
4
4k
WCS-LA-2024
lcolladotor
0
930
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Un-Boring Meetings
codingconduct
0
470
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
490
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