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
29
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
420
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
2.5k
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
350
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
260
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
510
t *testing.T は どこからやってくるの?
otakakot
1
940
「なんか〇〇ライブラリで脆弱性あるみたいなんだけど。。。」から始める脆弱性対応 / First Steps in Vulnerability Response
mackey0225
2
120
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
140
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
390
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.9k
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
200
AWSはOSSをどのように 考えているのか?
akihisaikeda
0
120
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
210
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
3.4k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
500
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
460
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
How STYLIGHT went responsive
nonsquared
100
6.1k
Claude Code のすすめ
schroneko
67
220k
Balancing Empowerment & Direction
lara
6
1.1k
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