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
170
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
19
Working effectively at scale
fdiaz
4
310
I hate public speaking. So why do I keep doing it?
fdiaz
0
150
Definiendo límites
fdiaz
1
140
Si odio hablar en público. ¿Por qué lo sigo haciendo?
fdiaz
2
160
Move fast and keep your code quality
fdiaz
1
400
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
170
Swift Values
fdiaz
0
150
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
140
Other Decks in Programming
See All in Programming
ファインチューニングせずメインコンペを解く方法
pokutuna
0
220
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
130
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
140
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
290
Nuxt Server Components
wattanx
0
220
Java 21/25 Virtual Threads 소개
debop
0
310
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
220
Coding as Prompting Since 2025
ragingwind
0
560
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
350
Rethinking API Platform Filters
vinceamstoutz
0
4.2k
へんな働き方
yusukebe
6
2.9k
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
90
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
460
Crafting Experiences
bethany
1
100
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Context Engineering - Making Every Token Count
addyosmani
9
780
Docker and Python
trallard
47
3.8k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Leo the Paperboy
mayatellez
5
1.6k
How to Talk to Developers About Accessibility
jct
2
170
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
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