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
1
150
Setting Boundaries
Presented at ViDIA meetup.
Francisco Díaz
March 10, 2016
Tweet
Share
More Decks by Francisco Díaz
See All by Francisco Díaz
Working effectively at scale
fdiaz
4
300
I hate public speaking. So why do I keep doing it?
fdiaz
0
140
Definiendo límites
fdiaz
1
120
Si odio hablar en público. ¿Por qué lo sigo haciendo?
fdiaz
2
140
Move fast and keep your code quality
fdiaz
1
370
De qué hablo cuando hablo de trabajo remoto
fdiaz
1
140
Swift Values
fdiaz
0
130
Sisifo o Cómo empezar de nuevo - y otra vez.
fdiaz
0
130
Other Decks in Programming
See All in Programming
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
500
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
190
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
300
EMこそClaude Codeでコード調査しよう
shibayu36
0
100
大規模アプリのDIフレームワーク刷新戦略 ~過去最大規模の並行開発を止めずにアプリ全体に導入するまで~
mot_techtalk
1
470
CSC509 Lecture 06
javiergs
PRO
0
260
AI Agent 時代的開發者生存指南
eddie
3
1.9k
チームの境界をブチ抜いていけ
tokai235
0
190
Leading Effective Engineering Teams in the AI Era
addyosmani
7
470
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
610
Software Architecture
hschwentner
6
2.3k
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
6.9k
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Typedesign – Prime Four
hannesfritz
42
2.8k
Git: the NoSQL Database
bkeepers
PRO
431
66k
YesSQL, Process and Tooling at Scale
rocio
173
14k
What's in a price? How to price your products and services
michaelherold
246
12k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Six Lessons from altMBA
skipperchong
29
4k
Side Projects
sachag
455
43k
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